+
Skip to content

Is there a way to validate a flag which is set via an ENV variable? #73

@wolfeidau

Description

@wolfeidau

So if i have a flag as follows, can i validate this is set without adding required?

The rational is I just want to know if it was defaulted from an ENV or set via a command flag.

Stage      stageFlag  `help:"The stage this is deployed." env:"STAGE"`

Cheers

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浏览器服务,不要输入任何密码和下载