Documentation ¶
Index ¶
- func CallFunction(fun interface{}, args []interface{}) ([]interface{}, error)
- func CallStructFunction(s interface{}, funcName string, args []interface{}) ([]interface{}, error)
- func CombineStruct(inf []interface{}) map[string]interface{}
- func DumpFunction(fun interface{}) string
- func DumpInterface(inf interface{}, comment string)
- func FloatToStr(f float64, precise ...int) string
- func GetFuncByName(st interface{}, name string, funcType interface{}) (reflect.Value, bool)
- func GetFuncInfo(v interface{}) (name string, file string, line int)
- func GetFuncName(f interface{}) string
- func GetStructField(inf interface{}) []string
- func GetStructFieldByName(s interface{}, name string) reflect.Value
- func GetStructValue(s interface{}, name string) (interface{}, error)
- func IsNil(i interface{}) bool
- func IsSameType(t1, t2 reflect.Type) bool
- func RecoverFunc(file string, line int, errSave ...bool)
- func ReflectFillField(field reflect.Value, key interface{}, value interface{}) error
- func ReflectFillSlice(dest interface{}, source interface{}) error
- func ReflectFillStruct(dest interface{}, source interface{}) error
- func SetStructField(s interface{}, name string, value interface{})
- func SetStructValue(s interface{}, name string, value interface{}) (bool, error)
- func Struct2Map(inf interface{}, m map[string]interface{}) error
- type DynamicStruct
- func (s *DynamicStruct) AddFieldByName(name string, valueType string, tag string) error
- func (s *DynamicStruct) AddFieldByType(name string, valueType interface{}, tag string) error
- func (s *DynamicStruct) AddSliceFieldByType(name string, valueType reflect.Type, tag string) error
- func (s *DynamicStruct) New(input interface{}) interface{}
- func (s *DynamicStruct) NewSlice(pointer bool, input ...interface{}) interface{}
- func (s *DynamicStruct) Type() reflect.Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallFunction ¶
func CallFunction(fun interface{}, args []interface{}) ([]interface{}, error)
func CallStructFunction ¶
func CombineStruct ¶
func CombineStruct(inf []interface{}) map[string]interface{}
func DumpFunction ¶
func DumpFunction(fun interface{}) string
func DumpInterface ¶
func DumpInterface(inf interface{}, comment string)
func FloatToStr ¶
func GetFuncByName ¶
func GetFuncInfo ¶
func GetFuncName ¶
func GetFuncName(f interface{}) string
func GetStructField ¶
func GetStructField(inf interface{}) []string
func GetStructFieldByName ¶
func GetStructValue ¶
func IsSameType ¶
func RecoverFunc ¶
func ReflectFillField ¶
func ReflectFillSlice ¶
func ReflectFillSlice(dest interface{}, source interface{}) error
func ReflectFillStruct ¶
func ReflectFillStruct(dest interface{}, source interface{}) error
func SetStructField ¶
func SetStructField(s interface{}, name string, value interface{})
func SetStructValue ¶
func Struct2Map ¶
Types ¶
type DynamicStruct ¶
type DynamicStruct struct {
// contains filtered or unexported fields
}
func NewDynamicStruct ¶
func NewDynamicStruct() *DynamicStruct
func (*DynamicStruct) AddFieldByName ¶
func (s *DynamicStruct) AddFieldByName(name string, valueType string, tag string) error
func (*DynamicStruct) AddFieldByType ¶
func (s *DynamicStruct) AddFieldByType(name string, valueType interface{}, tag string) error
func (*DynamicStruct) AddSliceFieldByType ¶
func (*DynamicStruct) New ¶
func (s *DynamicStruct) New(input interface{}) interface{}
func (*DynamicStruct) NewSlice ¶
func (s *DynamicStruct) NewSlice(pointer bool, input ...interface{}) interface{}
func (*DynamicStruct) Type ¶
func (s *DynamicStruct) Type() reflect.Type
Click to show internal directories.
Click to hide internal directories.