strutil

package
v0.0.0-...-61829c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StdStringifier = Stringifier{}
View Source
var (
	UnSupportTypeError = errors.New("un support type")
)

Functions

func ConvertFromStr

func ConvertFromStr(s string, v reflect.Value) error

func ConvertToStr

func ConvertToStr(v interface{}) (string, error)

func UnmarshalJSONUnmarshaler

func UnmarshalJSONUnmarshaler(s string, rv reflect.Value) (matched bool, err error)

func UnmarshalTimeDuration

func UnmarshalTimeDuration(s string, v reflect.Value) (matched bool, err error)

Types

type StringUnmarshal

type StringUnmarshal func(s string, v reflect.Value) (bool, error)

type Stringifier

type Stringifier struct {
	// contains filtered or unexported fields
}

func (*Stringifier) Register

func (stringifier *Stringifier) Register(stringUnmarshalList ...StringUnmarshal)

func (Stringifier) Unmarshal

func (stringifier Stringifier) Unmarshal(str string, rv reflect.Value) error

func (Stringifier) UnmarshalBuiltIn

func (stringifier Stringifier) UnmarshalBuiltIn(str string, rv reflect.Value) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL