Documentation
¶
Index ¶
- Variables
- func AssignValue(value string, field reflect.Value) error
- func GetExistEnv(name ...string) (string, bool)
- func HookTimeDuration(in reflect.Type, out reflect.Type, data interface{}) (interface{}, error)
- func NewOption(opts ...Option) *option
- func TagValue(field reflect.StructField, tags ...string) string
- func TagValueM(field reflect.StructField, tags ...string) string
- type HookFunc
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSkipLoader = errors.New("skip loader") ErrMissingOpt = errors.New("missing option") )
Functions ¶
func AssignValue ¶
AssignValue assigns the value to the field.
func GetExistEnv ¶
func HookTimeDuration ¶
HookTimeDuration for time.Duration
Types ¶
type Option ¶
type Option func(*option)
func WithLogger ¶
func WithLogger(logger logadapter.Adapter) Option
WithLogger sets the logger for logging.
func WithMapDecoder ¶
WithMapDecoder sets the decoder for conversion between map and struct.
- output is the target struct
Click to show internal directories.
Click to hide internal directories.