Skip to content

Commit

Permalink
[Fix] Fix default-auth example when less than 10 clusters (#1012)
Browse files Browse the repository at this point in the history
## Changes

This PR fixes the `default-auth` example which raised an out-of-bound
exception if the account has less than 10 clusters.

Note: the goal of the example is to demonstrate the auth mechanism, not
to iterate on workspaces.

## Tests

Unit test + run the example 

- [x] `make test` passing
- [x] `make fmt` applied
- [x] relevant integration tests applied
  • Loading branch information
renaudhartert-db authored Aug 8, 2024
1 parent f0f3482 commit 26ff8f7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions examples/default-auth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ func main() {
if err != nil {
panic(err)
}
for _, c := range all[:10] {
println(c.ClusterName)
}
println("Found %d clusters.", len(all))
}

0 comments on commit 26ff8f7

Please sign in to comment.