Skip to content

Commit

Permalink
fix: change map type from map[interface{}]interface{} to `map[strin…
Browse files Browse the repository at this point in the history
…g]interface{}`
  • Loading branch information
mircea-pavel-anton authored and budimanjojo committed Oct 11, 2024
1 parent 63424e4 commit 189706e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/substitute/pathsubst.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ func SubstituteRelativePaths(configFilePath string, yamlContent []byte) ([]byte,

func processNode(node interface{}, path []string, yamlDir string) interface{} {
switch n := node.(type) {
case map[interface{}]interface{}:
newMap := make(map[interface{}]interface{})
case map[string]interface{}:
newMap := make(map[string]interface{})
for k, v := range n {
keyStr := fmt.Sprintf("%v", k)
newPath := append(path, keyStr)
newPath := append(path, k)
newMap[k] = processNode(v, newPath, yamlDir)
}
return newMap
Expand Down

0 comments on commit 189706e

Please sign in to comment.