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

接口设计问题困惑 #316

Open
xmualex2023 opened this issue Apr 2, 2024 · 3 comments
Open

接口设计问题困惑 #316

xmualex2023 opened this issue Apr 2, 2024 · 3 comments

Comments

@xmualex2023
Copy link

func Open(ctx context.Context, conf *Config, o ...options.ClientOptions) (cli *QmgoClient, err error)
这个方法中,Config 里面必须传入Database和Coll。如果一个服务端代码中有多个coll,必须要设置多个重复conf。设计的很不好用。

func NewClient(ctx context.Context, conf *Config, o ...options.ClientOptions) (cli *Client, err error)
这个确实是创建Client,但是使用Config里面和Open相同的Config,哎。。。

@xmualex2023
Copy link
Author

补充下,Config 里面的Database和Coll 明显具有业务特性,还作为配置传入,有点无语

@ghost
Copy link

ghost commented Jun 1, 2024

无语个啥, 这是开源, 你自认比作者牛, 那你自己写个.

@ghost
Copy link

ghost commented Jun 1, 2024

补充下,Config 里面的Database和Coll 明显具有业务特性,还作为配置传入,有点无语

虽然我也费解为啥Coll会作为配置参数, 但是你这态度实在遭人厌

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

1 participant