Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bgiori committed Aug 3, 2023
1 parent e452546 commit e86ca0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions pkg/experiment/local/sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func topologicalSort(flags map[string]interface{}, flagKeys []string) ([]interfa
available[k] = v
}
// Get the starting keys
startingKeys := make([]string, 0)
var startingKeys []string
if len(flagKeys) > 0 {
startingKeys = flagKeys
} else {
Expand Down Expand Up @@ -56,7 +56,6 @@ func parentTraversal(flagKey string, available map[string]interface{}, path []st
}
}
result = append(result, flag)
path = path[:len(path)-1]
delete(available, flagKey)
return result, nil
}
Expand All @@ -77,7 +76,7 @@ func extractDependencies(flag interface{}) []string {
switch flags := flagsAny.(type) {
case map[string]interface{}:
result := make([]string, 0)
for k, _ := range flags {
for k := range flags {
result = append(result, k)
}
return result
Expand Down
2 changes: 1 addition & 1 deletion pkg/experiment/local/sort_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ func topologicalSortArray(flags []interface{}, flagKeys []string) ([]interface{}
}
}
// Get the starting keys
startingKeys := make([]string, 0)
var startingKeys []string
if len(flagKeys) > 0 {
startingKeys = flagKeys
} else {
Expand Down

0 comments on commit e86ca0d

Please sign in to comment.