查看模块源代码
// String is a helper that converts a Redis reply to a string. // // Reply type Result // integer format as decimal string // bulk return reply as string // string return as is // nil return error ErrNil // other return error func String(v interface{}, err error) (string, error) {
redis.String
将转换(v interface{}, err error)
中(string, error)
reply, err := redis.MultiBulk(c.Receive())
用...来代替
s, err := redis.String(redis.MultiBulk(c.Receive()))