mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Fix example.
This commit is contained in:
@ -29,14 +29,10 @@ func ExampleNewTCPClient() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func ExampleNewFailoverClient() {
|
func ExampleNewFailoverClient() {
|
||||||
client := redis.NewFailoverClient(&redis.FailoverOptions{
|
redis.NewFailoverClient(&redis.FailoverOptions{
|
||||||
MasterName: "master",
|
MasterName: "master",
|
||||||
SentinelAddrs: []string{":26379"},
|
SentinelAddrs: []string{":26379"},
|
||||||
})
|
})
|
||||||
|
|
||||||
pong, err := client.Ping().Result()
|
|
||||||
fmt.Println(pong, err)
|
|
||||||
// Output: PONG <nil>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExampleClient() {
|
func ExampleClient() {
|
||||||
|
Reference in New Issue
Block a user