Skip to content

Commit

Permalink
Swap to map[string]struct{}
Browse files Browse the repository at this point in the history
  • Loading branch information
atterpac committed Nov 25, 2023
1 parent 558aae7 commit 5340c5a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/refresh/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func main() {
var version string = "0.2.0"
var version string = "0.2.2"

var rootPath string
var preExec string
Expand Down Expand Up @@ -83,10 +83,10 @@ func main() {
<-make(chan struct{})
}

func stringSliceToMap(slice []string) map[string]bool {
m := make(map[string]bool)
func stringSliceToMap(slice []string) map[string]struct{} {
m := make(map[string]struct{})
for _, v := range slice {
m[v] = true
m[v] = struct{}{}
}
return m
}
Expand Down

0 comments on commit 5340c5a

Please sign in to comment.