+
Skip to content

Return an error if flag is provided twice #441

Open
@mitar

Description

@mitar

I had an issue that I made a mistake and instead of:

program -o /path --out .ext

I wrote:

program -o /path -out .ext

And was confused why is program writing out to "ut.ext" directory instead to /path. Is there a way to request kong to fail CLI parsing if a flag is provided twice? So for use cases like -vvv with counters this might be reasonable. And when field type is a slice. But providing multiple flags when field type is not a slice should return an error and not just that later flag silently overrides a prior flag. Or at least there should be an option to control this. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载