mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
replacements allow to replace multi values
This commit is contained in:
@@ -782,6 +782,13 @@ func IsListIndex(p string) bool {
|
||||
return strings.HasPrefix(p, "[") && strings.HasSuffix(p, "]")
|
||||
}
|
||||
|
||||
// IsIdxNumber returns true if p is an index number.
|
||||
// e.g. 1
|
||||
func IsIdxNumber(p string) bool {
|
||||
idx, err := strconv.Atoi(p)
|
||||
return err == nil && idx >= 0
|
||||
}
|
||||
|
||||
// SplitIndexNameValue splits a lookup part Val index into the field name
|
||||
// and field value to match.
|
||||
// e.g. splits [name=nginx] into (name, nginx)
|
||||
|
||||
Reference in New Issue
Block a user