Skip to content

Commit

Permalink
chore: address small nits in the version checker script
Browse files Browse the repository at this point in the history
  • Loading branch information
kilianc committed Apr 14, 2024
1 parent 8e55191 commit 78f5140
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/versioncheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

func main() {
pattern := regexp.MustCompile(`v[0-9]\.[0-9]\.[0-9]`)
versionSet := make(map[string][]string)
versionSet := map[string][]string{}
extensions := []string{".go", ".md"}

err := filepath.Walk(".", func(path string, info os.FileInfo, err error) error {
Expand Down Expand Up @@ -40,14 +40,14 @@ func main() {
})

if err != nil {
fmt.Println("Error walking the path:", err)
fmt.Println("error: failed to walk dir tree:", err)
return
}

versions := keys(versionSet)

if len(versions) > 1 {
fmt.Println("Error: Multiple version patterns found")
fmt.Println("error: multiple versions found")
for version, path := range versionSet {
fmt.Printf(" %s: %s\n", version, path)
}
Expand Down

0 comments on commit 78f5140

Please sign in to comment.