Skip to content

When using "go test -v", I get "unknown shorthand flag: 't' in -test.v=true" #65

@mosheco

Description

@mosheco

I have a project that imports and uses pflag.
Whenever I run tests with the "-v" flag , I get "unknown shorthand flag: 't' in -test.v=true" and also a print of the help text for the flags defined with pflag.
Without "-v" tests succeed.

Searching I have found the following PR in Cobra to seem to be related : spf13/cobra#155
Since Cobra also imports pflag, is there either a way to fix pflag or alternatively, some work around I can add to my own program?

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