diff --git a/config/interpolate_walk.go b/config/interpolate_walk.go index fd826012d8bf..828045ec3e8c 100644 --- a/config/interpolate_walk.go +++ b/config/interpolate_walk.go @@ -176,11 +176,7 @@ func (w *interpolationWalker) Primitive(v reflect.Value) error { } if remove { - // Append the key to the unknown keys w.unknownKeys = append(w.unknownKeys, strings.Join(w.key, ".")) - - //w.removeCurrent() - //return nil } resultVal := reflect.ValueOf(replaceVal) @@ -212,27 +208,6 @@ func (w *interpolationWalker) Primitive(v reflect.Value) error { return nil } -func (w *interpolationWalker) removeCurrent() { - // Append the key to the unknown keys - w.unknownKeys = append(w.unknownKeys, strings.Join(w.key, ".")) - - for i := 1; i <= len(w.cs); i++ { - c := w.cs[len(w.cs)-i] - switch c.Kind() { - case reflect.Map: - // Zero value so that we delete the map key - var val reflect.Value - - // Get the key and delete it - k := w.csData.(reflect.Value) - c.SetMapIndex(k, val) - return - } - } - - panic("No container found for removeCurrent") -} - func (w *interpolationWalker) replaceCurrent(v reflect.Value) { c := w.cs[len(w.cs)-2] switch c.Kind() {