Skip to content

Commit

Permalink
Move getSortedKeys functions above main
Browse files Browse the repository at this point in the history
  • Loading branch information
philwo committed Feb 4, 2020
1 parent 858a216 commit 3719a76
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions bazelisk.go
Expand Up @@ -715,6 +715,15 @@ func migrate(bazelPath string, baseArgs []string, flags map[string]*flagDetails)
os.Exit(1)
}

func getSortedKeys(data map[string]*flagDetails) []string {
result := make([]string, 0)
for key, _ := range data {
result = append(result, key)
}
sort.Strings(result)
return result
}

func main() {
bazeliskHome := os.Getenv("BAZELISK_HOME")
if len(bazeliskHome) == 0 {
Expand Down Expand Up @@ -816,12 +825,3 @@ func main() {
}
os.Exit(exitCode)
}

func getSortedKeys(data map[string]*flagDetails) []string {
result := make([]string, 0)
for key, _ := range data {
result = append(result, key)
}
sort.Strings(result)
return result
}

0 comments on commit 3719a76

Please sign in to comment.