Handling of config structs with tagged struct fields
- Dominant language
- Go
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
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:
```go
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).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the nested-struct parsing introduced in issue #1 and trace how tags on the nested DBConfig field are handled. Define and document the chosen behavior for tagged grouping structs, then add coverage for the Config and DBConfig example so the behavior is explicit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100