Skip to content

Commit

Permalink
Cleaned up a little unnecessary code.
Browse files Browse the repository at this point in the history
  • Loading branch information
edpark11 committed Sep 2, 2018
1 parent 7d6e654 commit 75ee0d1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,7 @@ func dethunkMapBreadthFirst(m map[string]interface{}, dethunkQueue *dethunkQueue
if f, ok := v.(func() interface{}); ok {
m[k] = f()
}
}
for _, v := range m {
switch val := v.(type) {
switch val := m[k].(type) {
case map[string]interface{}:
dethunkQueue.push(func() { dethunkMapBreadthFirst(val, dethunkQueue) })
case []interface{}:
Expand All @@ -335,9 +333,7 @@ func dethunkListBreadthFirst(list []interface{}, dethunkQueue *dethunkQueue) {
if f, ok := v.(func() interface{}); ok {
list[i] = f()
}
}
for _, v := range list {
switch val := v.(type) {
switch val := list[i].(type) {
case map[string]interface{}:
dethunkQueue.push(func() { dethunkMapBreadthFirst(val, dethunkQueue) })
case []interface{}:
Expand Down

0 comments on commit 75ee0d1

Please sign in to comment.