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

Handling of config structs with tagged struct fields #2

Open
hariso opened this issue Dec 2, 2024 · 0 comments
Open

Handling of config structs with tagged struct fields #2

hariso opened this issue Dec 2, 2024 · 0 comments

Comments

@hariso
Copy link

hariso commented Dec 2, 2024

Ecdysis makes it possible to build flags from a struct, and in #1 we added support for parsing nested structs. We found that the following case is possible and needs to be properly handled:

type Config struct {
  DBConfig DBConfig `long:"database config"` 
}
type DBConfig struct {
  URL string `long:"db url"`
}

Nested structs are not flags on their own, they are merely a way to group flags. The goal of this issue is to clarify the usage of tags on nested structs (we can either forbid them, or allow them if we have a way to describe groups of flags).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant