Skip to content

Commit

Permalink
config: clean up unused fucntions
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Nov 9, 2016
1 parent f73a857 commit 5c84026
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions config/interpolate_walk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 5c84026

Please sign in to comment.