Skip to content

Commit

Permalink
chore: typo correction and preallocation of slice for backward path t…
Browse files Browse the repository at this point in the history
…ranslation
  • Loading branch information
Prashansa-K committed Aug 5, 2024
1 parent d5b932c commit 851992b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kong/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ func fillConfigRecord(schema gjson.Result, config Configuration) Configuration {
if v, ok := config[fname]; ok {
if v != nil {
// This config's value should be retained.
// Also, the resul config 'res' may have a different value for some nested fields than this.
// Also, the result config 'res' may have a different value for some nested fields than this.
// As per current conventions, shorthand fields take priority when different values are present
// in equivalent shorthand configs and normal nested configs.
// Backfilling nested configs to reduce inconsistencies.
Expand All @@ -434,7 +434,7 @@ func fillConfigRecord(schema gjson.Result, config Configuration) Configuration {
return true
}

var configPathForBackwardTranslation []string
configPathForBackwardTranslation := make([]string, 0, len(backwardTranslation.Array()))
for _, value := range backwardTranslation.Array() {
configPathForBackwardTranslation = append(configPathForBackwardTranslation, value.Str)
}
Expand Down

0 comments on commit 851992b

Please sign in to comment.