Skip to content

Special case the "version" string #36

@kevinburkesegment

Description

@kevinburkesegment

We have a config that looks like e.g.

type config struct {
	Version         bool   `conf:"version" help:"Print the program version and exit."`
	S3Bucket        string `conf:"s3-bucket" help:"The S3 bucket to deliver logs batches to." validate:"nonzero"`
}

If you run ./myprogram --version you get the following error:

Error:
  invalid value passed to s3-bucket: zero value

Instead I expect to see the version number printed out. I'm not sure what the right approach would be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions