Skip to content
New issue

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

隐藏连接池相关操作 #62

Closed
shhch opened this issue Feb 25, 2021 · 3 comments
Closed

隐藏连接池相关操作 #62

shhch opened this issue Feb 25, 2021 · 3 comments

Comments

@shhch
Copy link

shhch commented Feb 25, 2021

现有的连接池要服务自己去获取连接和归还连接,这一步对服务而言有点多余,能不能将获取与归还的操作转移到具体命令函数中,让连接的使用对用户无感知?

@seefan
Copy link
Owner

seefan commented Feb 26, 2021

使用这个方式就可以了

if v, err := gossdb.Client().Get("a"); err == nil {
println(v.String())
} else {
println(err.Error())
}

@shhch
Copy link
Author

shhch commented Feb 26, 2021

好像是我使用的是v1.1.2版本的问题,但是使用go get无法拉取到v2.0版本,有点奇怪

@shhch
Copy link
Author

shhch commented Feb 26, 2021

image

@shhch shhch closed this as completed Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants