- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for PathKV (5.27 sec)
-
operator/pkg/util/path.go
if !ok { return false } n, err := strconv.Atoi(pe) return err == nil && n >= InsertIndex } // PathKV returns the key and value string parts of the entire key/value path element. // It returns an error if pe is not a key/value path element. func PathKV(pe string) (k, v string, err error) { if !IsKVPathElement(pe) { return "", "", fmt.Errorf("%s is not a valid key:value path element", pe) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Dec 12 17:12:54 UTC 2023 - 5.5K bytes - Viewed (0) -
operator/pkg/tpath/tree.go
// must have map type, and try to find one which has a matching key:value. for idx, le := range lst { // non-leaf list, expect to match item by key:value. if lm, ok := le.(map[any]any); ok { k, v, err := util.PathKV(pe) if err != nil { return nil, false, fmt.Errorf("path %s: %s", fullPath, err) } if stringsEqual(lm[k], v) { scope.Debugf("found matching kv %v:%v", k, v) nn := &PathContext{
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 17.5K bytes - Viewed (0) -
operator/pkg/translate/translate.go
break } if util.IsKVPathElement(pe) { currentNode, ok := currentNode.([]any) if !ok { return nil, fmt.Errorf("path %s has an unexpected KV element %s", path, pe) } k, v, err := util.PathKV(pe) if err != nil { return nil, err } if k == "" || v == "" { return nil, fmt.Errorf("path %s has an invalid KV element %s", path, pe) } currentNode[0] = map[string]any{k: v}
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Feb 12 19:43:09 UTC 2024 - 36.3K bytes - Viewed (0)