diff --git a/README.md b/README.md index c05d2a0..87cdbe4 100644 --- a/README.md +++ b/README.md @@ -411,7 +411,7 @@ var wg sync.WaitGroup for i := 0; i < 5; i++ { wg.Add(1) go func() { - ids := []string{batches[rand.IntN(2)][rand.IntN(4)], batches[rand.IntN(2)][rand.IntN(4)]} + ids := []string{batches[rand.IntN(3)][rand.IntN(5)], batches[rand.IntN(3)][rand.IntN(5)]} res, _ := cacheClient.GetOrFetchBatch(context.Background(), ids, keyPrefixFn, fetchFn) log.Printf("got batch: %v\n", res) wg.Done() diff --git a/examples/basic/main.go b/examples/basic/main.go index 69bbfac..a6b9ab2 100644 --- a/examples/basic/main.go +++ b/examples/basic/main.go @@ -82,7 +82,7 @@ func demonstrateGetOrFetchBatch(cacheClient *sturdyc.Client[int]) { for i := 0; i < 5; i++ { wg.Add(1) go func() { - ids := []string{batches[rand.IntN(2)][rand.IntN(4)], batches[rand.IntN(2)][rand.IntN(4)]} + ids := []string{batches[rand.IntN(3)][rand.IntN(5)], batches[rand.IntN(3)][rand.IntN(5)]} res, _ := cacheClient.GetOrFetchBatch(context.Background(), ids, keyPrefixFn, fetchFn) log.Printf("got batch: %v\n", res) wg.Done()