Skip to content

Commit

Permalink
fix: random in example
Browse files Browse the repository at this point in the history
  • Loading branch information
SpencerTorres committed Feb 26, 2025
1 parent d76d9bf commit d21fac7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/clickhouse_api/multi_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package clickhouse_api
import (
"fmt"
"github.com/ClickHouse/clickhouse-go/v2"
"math/rand"
)

func MultiHostVersion() error {
Expand All @@ -32,6 +33,7 @@ func MultiHostRoundRobinVersion() error {
}

func MultiHostRandomVersion() error {
rand.Seed(85206178671753423)
connOpenStrategy := clickhouse.ConnOpenRandom
return multiHostVersion(&connOpenStrategy)
}
Expand Down

0 comments on commit d21fac7

Please sign in to comment.