mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
config: clean up unused fucntions
This commit is contained in:
parent
9b5b122f14
commit
a8fbf3420c
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user