Skip to content

Handling of config structs with tagged struct fields #2

@hariso

Description

@hariso

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions