Documentation ¶
Index ¶
- Constants
- func Copy(src, dst interface{})
- func FieldNames(t reflect.Type) []string
- func Get(v interface{}, field string) interface{}
- func IndexByField(structList interface{}, field string, value interface{}) int
- func Kv2Map(s ...interface{}) map[string]interface{}
- func MapGet(m interface{}, key interface{}) interface{}
- func New(s interface{}) *structs.Struct
- func NewMap(m interface{}) map[interface{}]*structs.Struct
- func NewSlice(structList interface{}) []*structs.Struct
- func Pick(s interface{}, keys ...string) map[string]interface{}
- func Ptr(a interface{}) interface{}
- func PtrType(t reflect.Type) reflect.Type
- func PtrValue(v reflect.Value) reflect.Value
- func Struct2Map(s interface{}) map[string]interface{}
- func Unpick(s interface{}, keys ...string) map[string]interface{}
- type A
- type M
- type MS
- type Map
- func (m *Map) Each(fn func(k, v interface{}))
- func (m *Map) EmptyValue() interface{}
- func (m *Map) Get(key interface{}) interface{}
- func (m *Map) Make() *Map
- func (m *Map) MakeWithSize(size int) *Map
- func (m *Map) NewValue() interface{}
- func (m *Map) Put(key, value interface{})
- func (m *Map) PutJson(key interface{}, jsonBs []byte) error
- type Slice
- type Structs
Constants ¶
View Source
const (
ErrorType = 1
)
Variables ¶
This section is empty.
Functions ¶
func FieldNames ¶
func IndexByField ¶
func Struct2Map ¶
func Struct2Map(s interface{}) map[string]interface{}
Types ¶
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map like map[string]User
func FromMap ¶
func FromMap(emptyMapAddr interface{}) *Map
NewMap useage : var m map[string]User NewMap(&m)
func (*Map) EmptyValue ¶
func (m *Map) EmptyValue() interface{}
func (*Map) MakeWithSize ¶
type Slice ¶
Click to show internal directories.
Click to hide internal directories.