Documentation
¶
Overview ¶
original package located here https://github.com/mcuadros/go-lookup
Index ¶
- Constants
- Variables
- func Lookup(i interface{}, path ...string) (reflect.Value, error)
- func LookupI(i interface{}, path ...string) (reflect.Value, error)
- func LookupString(i interface{}, path string) (reflect.Value, error)
- func LookupStringI(i interface{}, path string) (reflect.Value, error)
- func SplitNameByWords(src string) []string
Constants ¶
View Source
const ( SplitToken = "." IndexCloseChar = "]" IndexOpenChar = "[" )
Variables ¶
Functions ¶
func Lookup ¶
Lookup performs a lookup into a value, using a path of keys. The key should match with a Field or a MapIndex. For slice you can use the syntax key[index] to access a specific index. If one key owns to a slice and an index is not specificied the rest of the path will be apllied to evaley value of the slice, and the value will be merged into a slice.
func LookupString ¶
LookupString performs a lookup into a value, using a string. Same as `Lookup` but using a string with the keys separated by `.`
func LookupStringI ¶
LookupStringI is the same as LookupString, but the path is not case sensitive.
func SplitNameByWords ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.