init repo
This commit is contained in:
9
vendor/github.com/clbanning/mxj/v2/exists.go
generated
vendored
Normal file
9
vendor/github.com/clbanning/mxj/v2/exists.go
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
package mxj
|
||||
|
||||
// Checks whether the path exists. If err != nil then 'false' is returned
|
||||
// along with the error encountered parsing either the "path" or "subkeys"
|
||||
// argument.
|
||||
func (mv Map) Exists(path string, subkeys ...string) (bool, error) {
|
||||
v, err := mv.ValuesForPath(path, subkeys...)
|
||||
return (err == nil && len(v) > 0), err
|
||||
}
|
||||
Reference in New Issue
Block a user