Documentation ¶
Index ¶
- func Copy(dst, src interface{})
- func CopyOf(src interface{}) (dst interface{})
- func Prettify(i interface{}) string
- func SetValueAtAnyPath(i interface{}, path string, v interface{})
- func SetValueAtPath(i interface{}, path string, v interface{})
- func ValuesAtAnyPath(i interface{}, path string) []interface{}
- func ValuesAtPath(i interface{}, path string) []interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶
func Copy(dst, src interface{})
Copy deeply copies a src structure to dst. Useful for copying request and response structures.
Can copy between structs of different type, but will only copy fields which are assignable, and exist in both structs. Fields which are not assignable, or do not exist in both structs are ignored.
func CopyOf ¶
func CopyOf(src interface{}) (dst interface{})
CopyOf returns a copy of src while also allocating the memory for dst. src must be a pointer type or this operation will fail.
func Prettify ¶ added in v1.1.1
func Prettify(i interface{}) string
Prettify returns the string representation of a value.
func SetValueAtAnyPath ¶
func SetValueAtAnyPath(i interface{}, path string, v interface{})
SetValueAtAnyPath sets an object at the case insensitive lexical path inside of a structure
func SetValueAtPath ¶
func SetValueAtPath(i interface{}, path string, v interface{})
SetValueAtPath sets an object at the lexical path inside of a structure
func ValuesAtAnyPath ¶
func ValuesAtAnyPath(i interface{}, path string) []interface{}
ValuesAtAnyPath returns a list of objects at the case-insensitive lexical path inside of a structure
func ValuesAtPath ¶
func ValuesAtPath(i interface{}, path string) []interface{}
ValuesAtPath returns a list of objects at the lexical path inside of a structure
Types ¶
This section is empty.