config: clean up unused fucntions

This commit is contained in:
Mitchell Hashimoto 2016-11-09 14:23:28 -08:00
parent 9b5b122f14
commit a8fbf3420c
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A

View File

@ -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() {