We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func Set(key string, data interface{}, time int) (bool, error) { conn := RedisConn.Get() defer conn.Close()
value, err := json.Marshal(data) if err != nil { return false, err } reply, err := redis.Bool(conn.Do("SET", key, value)) conn.Do("EXPIRE", key, time) return reply, err
}
您好,在这个方法中,conn.Do("SET", key, value) 这个返回一个ok,err ,ok一个字符串“ok”,那这里用redis.Bool()方法不是很合适吧。还是我这边测试的问题
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
5c96763
@xhochipe 感谢反馈,是我这边的代码出现了纰漏
已经修复了 😁
没事 @eddycjy ,一直在关注你更新这个,我现在也在你写的基础上自己在学,另外博主这边有木有qq群什么的,可以学习跟你学习
@xhochipe Q 群暂时没有哦,如果有什么问题或想法,欢迎随时在 SF 私信我,或者 Github 上来找我 🤔
其实你这样才是较好实践,因为每个人对知识的理解都不一样,举一反三是最好的学习姿势!
No branches or pull requests
func Set(key string, data interface{}, time int) (bool, error) {
conn := RedisConn.Get()
defer conn.Close()
}
您好,在这个方法中,conn.Do("SET", key, value) 这个返回一个ok,err ,ok一个字符串“ok”,那这里用redis.Bool()方法不是很合适吧。还是我这边测试的问题
The text was updated successfully, but these errors were encountered: