Documentation ¶
Overview ¶
misc data-structure utility functions
Index ¶
- func Load(addr interface{}, b []byte) error
- func Load2(addr interface{}, b []byte, enc string) error
- func LoadStruct(addr interface{}, m map[string]interface{}) error
- func StructToMap(addr interface{}) map[string]interface{}
- func ToBytes(o interface{}, jsonPretty bool) ([]byte, error)
- func ToBytes2(o interface{}, enc string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadStruct ¶
func StructToMap ¶
func StructToMap(addr interface{}) map[string]interface{}
TODO: this method is very unoptimized It converts to json first, and then loads a map Need to do this directly using reflection
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.