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

[improvement] change the query config group default values to StructOpt default #1867

Closed
BohuTANG opened this issue Sep 17, 2021 · 2 comments
Assignees
Labels
C-improvement Category: improvement community-take good first issue Category: good first issue

Comments

@BohuTANG
Copy link
Member

Summary

In query/config, every config group has his default values, we can use structop default to do that, for example:

impl MetaConfig {
    pub fn default() -> Self {
        MetaConfig {
            meta_address: "".to_string(),
            meta_username: "root".to_string(),
            meta_password: "".to_string(),
            rpc_tls_meta_server_root_ca_cert: "".to_string(),
            rpc_tls_meta_service_domain_name: "localhost".to_string(),
        }
    }
}

->

impl MetaConfig {
    pub fn default() -> Self {
       <Self as StructOpt>::from_iter(&Vec::<&'static str>::new())
    }
}
@BohuTANG BohuTANG added C-improvement Category: improvement good first issue Category: good first issue labels Sep 17, 2021
@xuyifangreeneyes
Copy link
Contributor

/assignme

@PsiACE
Copy link
Member

PsiACE commented Jan 17, 2022

#1891 (comment)

We are now using clap v3 to replace structopt. Let's move forward.

@PsiACE PsiACE closed this as completed Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-improvement Category: improvement community-take good first issue Category: good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants