Documentation ¶
Index ¶
- Variables
- func BindArgs(st interface{}, key string) (err error)
- func BindArgsConf(st interface{}, key string) (err error)
- func BindConf(st interface{}, key string) (err error)
- func Close() (err error)
- func CopyValue(src, dst reflect.Value)
- func FillValue(v reflect.Value) reflect.Value
- func In()
- func Init() (err error)
- func JoinTag(tag map[string]string) reflect.StructTag
- func Link(f interface{}) (interface{}, func(), func())
- func Out()
- func ParseTag(tag string) (value map[string]string)
- func Save() (err error)
- func SplitTagValue(value string) []string
- func UnwindType(v reflect.Type, usingLastPtr bool) (r reflect.Type, pc int)
- func UnwindValue(v reflect.Value, fillNil bool, usingLastPtr bool) (r reflect.Value, pc int)
- func WindType(v reflect.Type, pc int) (r reflect.Type)
- type LoadConfigFunc
- type MappedConfiguration
- type RegisterFunc
- type SaveConfigFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RegisterCmdArgs RegisterFunc = defaultRegisterCmdArgsFlagStd LoadConfig LoadConfigFunc = defaultLoadConfig SaveConfig SaveConfigFunc = defaultSaveConfig SaveOnClose = false TagName = "bind" )
View Source
var (
ErrHandlerNotSet = errors.New("handler not set")
)
Functions ¶
func BindArgsConf ¶
func Link ¶ added in v1.1.0
func Link(f interface{}) (interface{}, func(), func())
Link creates an intermediate struct of original struct fields
func SplitTagValue ¶
func UnwindType ¶ added in v1.1.0
func UnwindValue ¶ added in v1.1.0
Types ¶
type LoadConfigFunc ¶
type LoadConfigFunc func(mc *MappedConfiguration) error
Passed *MappedConfiguration
type MappedConfiguration ¶
type MappedConfiguration map[string]interface{}
type RegisterFunc ¶
type RegisterFunc func(parent string, fieldType reflect.StructField, fieldValue reflect.Value)
type SaveConfigFunc ¶
type SaveConfigFunc func(mc *MappedConfiguration) error
Click to show internal directories.
Click to hide internal directories.