fix: Correct typo in appenPath function name (#17917)

pull/17057/merge
Bogdan Bojan 7 months ago committed by GitHub
parent 2fb1f7eddb
commit bf783a73ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      tools/deprecated-config-checker/checker/checker.go

@ -182,7 +182,7 @@ func (d DeprecationNotes) String() string {
return sb.String()
}
func appenToPath(path, key string) string {
func appendToPath(path, key string) string {
if path == "" {
return key
}
@ -221,8 +221,8 @@ func checkRuntimeConfigDeprecated(deprecates, runtimeConfig RawYaml) []Deprecati
for tenant, tenantOverrides := range overrides {
tenantDeprecations := checkConfigDeprecated(deprecatedLimits, tenantOverrides.(RawYaml))
for i := range tenantDeprecations {
tenantPath := appenToPath("overrides", tenant)
tenantDeprecations[i].ItemPath = appenToPath(tenantPath, tenantDeprecations[i].ItemPath)
tenantPath := appendToPath("overrides", tenant)
tenantDeprecations[i].ItemPath = appendToPath(tenantPath, tenantDeprecations[i].ItemPath)
}
deprecations = append(deprecations, tenantDeprecations...)
}
@ -242,7 +242,7 @@ func enumerateDeprecatesFields(deprecates, input RawYaml, rootPath string, depre
continue
}
path := appenToPath(rootPath, key)
path := appendToPath(rootPath, key)
note, isDeprecatedNote := getDeprecationAnnotation(deprecate)
if isDeprecatedNote {
@ -297,7 +297,7 @@ func enumerateDeprecatesFields(deprecates, input RawYaml, rootPath string, depre
// If the config is a list, recurse into each item.
for i, item := range v {
itemYaml := item.(RawYaml)
deprecations = enumerateDeprecatesFields(deprecateYaml, itemYaml, appenToPath(path, fmt.Sprintf("[%d]", i)), deprecations)
deprecations = enumerateDeprecatesFields(deprecateYaml, itemYaml, appendToPath(path, fmt.Sprintf("[%d]", i)), deprecations)
}
}
}

Loading…
Cancel
Save