Documentation ¶
Index ¶
- func CamelToUnderline(name string) string
- func MapToStruct(obj interface{}, ret interface{}) error
- func StructToJSON(params interface{}) (json.RawMessage, error)
- func StructToMap(obj interface{}) (ret map[string]interface{}, err error)
- func StructToQuery(obj interface{}) (ret httpURL.Values, err error)
- func StructToStruct(src interface{}, target interface{}) (err error)
- func XMLToMap(buf []byte) (stringMap map[string]string, err error)
- type XMLMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapToStruct ¶
func MapToStruct(obj interface{}, ret interface{}) error
func StructToJSON ¶
func StructToJSON(params interface{}) (json.RawMessage, error)
func StructToMap ¶
func StructToQuery ¶
StructToQuery 支持 结构体和map[string]interface{}
func StructToStruct ¶
func StructToStruct(src interface{}, target interface{}) (err error)
StructToStruct 传入两个结构体, src可以传指针也可以传值, target必须传指针. 使用要求必须同字段,且要同类型.
Types ¶
Click to show internal directories.
Click to hide internal directories.