我嘗試連接到 REDIS SENTINEL 的代碼。由于我是 golang 新手,想澄清我出了什么問題?REDIS SENTINEL 已配置并正常工作。package mainimport ( "fmt" "github.com/go-redis/redis")func main() { rdb:=redis.NewFailoverClient(&redis.FailoverOptions( MasterName: "mymaster", SentinelAddrs: "XXX.XXX.XXX.XXX:26379","XXX.XXX.XXX.XXX:26379","XXX.XXX.XXX.XXX:26379", )) rdb.Ping()}跑步:$ go run redis.go**# command-line-arguments**>./redif.go:11:12: syntax error: unexpected :, expecting comma or )**
- 0 回答
- 0 關(guān)注
- 206 瀏覽
添加回答
舉報(bào)
0/150
提交
取消