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
可以给 cache/redis.go 增加一个指定Redis 对象的方法,由项目统一配置和管理,就不需要组件单独连接了。 //NewRedis 实例化 func SetRedis(pool *redis.Pool) *Redis { return &Redis{pool} }
The text was updated successfully, but these errors were encountered:
是可以的
Sorry, something went wrong.
@cool222
myCache := &wechatCache.Redis{} myCache.SetConn(cache.GetPool())
这样不就行了
已经有了
No branches or pull requests
可以给 cache/redis.go 增加一个指定Redis 对象的方法,由项目统一配置和管理,就不需要组件单独连接了。
//NewRedis 实例化
func SetRedis(pool *redis.Pool) *Redis {
return &Redis{pool}
}
The text was updated successfully, but these errors were encountered: