Skip to content

Commit

Permalink
Merge pull request #42 from embano1/issue-40
Browse files Browse the repository at this point in the history
Sharding example uses `len(keys)`
  • Loading branch information
Michael Gasch authored Mar 22, 2022
2 parents bb79a41 + 1544aac commit 1a98db4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sharded/example_sharder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func Example_sharder() {
ks := sharded.NewKeySharder(keys)

opts := []sharded.Option{
sharded.WithNumShards(2), // must be >=len(keys)
sharded.WithNumShards(uint(len(keys))), // must be >=len(keys)
sharded.WithSharder(ks),
}
l, err := sharded.New(ctx, opts...)
Expand Down

0 comments on commit 1a98db4

Please sign in to comment.