Documentation
¶
Index ¶
- func Get(object interface{}, path string) (interface{}, error)
- func Set(object interface{}, path string, value interface{}) error
- type Getter
- type Path
- func (path Path) Get(object interface{}) (interface{}, error)
- func (path Path) HasTail() bool
- func (path Path) Head() string
- func (path Path) Index(maximum int) (int, error)
- func (path Path) IsEmpty() bool
- func (path Path) Set(object interface{}, value interface{}) error
- func (path Path) String() string
- func (path Path) Tail() Path
- type Setter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Getter ¶
Getter interface allows other objects to make it easy to trace through their property trees, and get values from them.
type Path ¶
type Path []string
Path is a reference to a value within another data object.
func (Path) HasTail ¶ added in v0.1.2
HasTail returns TRUE if this path has one or more items in its tail.
func (Path) Index ¶
Index is useful for vetting array indices. It attempts to convert the Head() token int an integer, and then check that the integer is within the designated array bounds (is greater than zero, and less than the maximum value provided to the function).
It returns the array index and an error
Click to show internal directories.
Click to hide internal directories.