Skip to content

接口设计问题困惑 #316

Open
Open
@xmualex2023

Description

@xmualex2023

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,哎。。。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions