我尝试连接到 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 关注
- 145 浏览
添加回答
举报
0/150
提交
取消