Skip to content

Commit

Permalink
Merge pull request #7 from OkieOth/fix_go_routines
Browse files Browse the repository at this point in the history
fix go routines bug and bump patch version
  • Loading branch information
OkieOth authored Sep 17, 2024
2 parents b2a21b4 + 1fa68d3 commit d9596e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions cmd/schemaguesser/cmd/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ func printSchemasForAllCollections(client *mongo.Client, dbName string) {
var wg sync.WaitGroup
for _, coll := range *collections {
wg.Add(1)
go func() {
go func(s string) {
defer wg.Done()
printSchemaForOneCollection(client, dbName, coll, true)
}()
printSchemaForOneCollection(client, dbName, s, true)
}(coll)
}
wg.Wait()
}
Expand All @@ -102,10 +102,10 @@ func printSchemasForAllDatabases(client *mongo.Client) {
var wg sync.WaitGroup
for _, db := range *dbs {
wg.Add(1)
go func() {
go func(s string) {
defer wg.Done()
printSchemasForAllCollections(client, db)
}()
printSchemasForAllCollections(client, s)
}(db)
}
wg.Wait()
}
2 changes: 1 addition & 1 deletion cmd/schemaguesser/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/spf13/cobra"
)

const Version = "2.0.0"
const Version = "2.0.1"

var versionCmd = &cobra.Command{
Use: "version",
Expand Down

0 comments on commit d9596e9

Please sign in to comment.