Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnsupportedType = errors.New("unsupported type") ErrInvalidIndex = errors.New("invlaid index") ErrInvalidFieldName = errors.New("invlaid field name") ErrInvalidKey = errors.New("invlaid key") ErrNilPointer = errors.New("nil pointer") )
var (
ErrCantSet = errors.New("cannot set")
)
Functions ¶
func Add ¶
Add the provided value at the specified path. Overrides the value if target is a field. If target is a slice, append to slice. If target is a map and the key doesn't exist, create the key with value. If target is a map and the key does exist, override the value.
func Get ¶
Get retrieves the value from the object at the specified path. If a wildcard is used, a slice of matching values is returned.
func Remove ¶
Remove the provided value at the specified path. If the value of the target is the field of a struct, it will be zerored. If it is a pointer, it will not be nulled, but indirect will be zeroed. If value of the target is in a map, it will be deleted from the map. If the target is an index of a slice it will be deleted from the slice while presering slice order. If the target is an index to an array, that value will be zeroed.