Documentation ¶
Index ¶
- type Reflect
- func (r *Reflect) Clear()
- func (r *Reflect) Get(name string) interface{}
- func (r *Reflect) Interface() interface{}
- func (r *Reflect) InterfaceArray() []interface{}
- func (r *Reflect) IsMap() bool
- func (r *Reflect) IsPtr() bool
- func (r *Reflect) IsSlice() bool
- func (r *Reflect) Set(name string, value interface{}) error
- func (r *Reflect) SetAny(mapOrStructOrSlice ...interface{}) error
- func (r *Reflect) ToMap() map[string]interface{}
- func (r *Reflect) ToMapExpandAll() map[string]interface{}
- func (r *Reflect) ToMaps() []map[string]interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reflect ¶
type Reflect struct {
// contains filtered or unexported fields
}
func New ¶
func New(object interface{}) *Reflect
New
@Description: 创建反射实例 @param object 任意对象 @return Reflect
func (*Reflect) Interface ¶
func (r *Reflect) Interface() interface{}
Interface
@Description: 返回对象 @return interface{}
func (*Reflect) InterfaceArray ¶
func (r *Reflect) InterfaceArray() []interface{}
InterfaceArray
@Description: 返回对象 @return interface{}
func (*Reflect) SetAny ¶
SetAny
@Description: 将任意对象写入到对象中 @param mapOrStructOrSlice 字典、结构体、切片 @return error
func (*Reflect) ToMapExpandAll ¶
ToMapExpandAll
@Description: 转为字典,此方法会遍历所有字典值,将值为json字符串的再次展开 @return map[string]
Click to show internal directories.
Click to hide internal directories.