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

Way to ignore some fields in struct #174

Closed
Morganamilo opened this issue Mar 23, 2019 · 1 comment · Fixed by #213
Closed

Way to ignore some fields in struct #174

Morganamilo opened this issue Mar 23, 2019 · 1 comment · Fixed by #213
Labels
enhancement We would love to have this feature! Feel free to supply a PR

Comments

@Morganamilo
Copy link
Contributor

My config struct has a couple of fields that are unrelated to config parsing. It would nice to be able to mark them as ignored so no flags are generated for them and there's no requirement for the field to support FromStr and instead Require the field to implement Default.

@TeXitoi
Copy link
Owner

TeXitoi commented Apr 9, 2019

I propose #[structopt(skip)] for this feature, as this is the serde way.

@TeXitoi TeXitoi added the enhancement We would love to have this feature! Feel free to supply a PR label Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement We would love to have this feature! Feel free to supply a PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants