Skip to content

Commit

Permalink
Possible fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CezarAntohe committed Oct 11, 2023
1 parent dcf8e8f commit 3afd49d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func createServiceMetadataPatch(serviceId string, namespace string, field string
// path is a list of keys separated by dots, e.g. "spec.template.spec.containers[0].image"
// if the field is a slice, the last key must be in the form of "key[index]"
func getNestedString(object interface{}, path []string) (string, bool, error) {
re := regexp.MustCompile(`^(.*)\[(\d+)]$`)
re := regexp.MustCompile(`^(.*)\[(\d+|[a-z]+)]$`)
var cpath []string
for i, key := range path {
m := re.FindStringSubmatch(key)
Expand Down

0 comments on commit 3afd49d

Please sign in to comment.