Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidPath = errors.New("invalid path") ErrNotSlice = errors.New("not a slice") ErrNotMap = errors.New("not a map") ErrOutOfBounds = errors.New("index out of bounds") ErrInvalidInterface = errors.New("cannot get interface of value") ErrNil = errors.New("cannot get index or key of nil") ErrKeyType = errors.New("cannot handle this type of key") )
Functions ¶
func EscapeKey ¶
func EscapeKey(v interface{}) string
EscapeKey produces a string from a key (int, string, etc), enclosing it in quotes when necessary. This should be used when generating json paths to avoid ambiguity from keys such as `foo.bar`.
func ExecutePath ¶
func HasSuffix ¶
HasSuffix tests whether the string s ends with suffix, ignoring indices in brackets.
func StripIndices ¶
StripIndices removes the characters in between brackets in a json path
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.