Skip to content

Do we need default Usage for root command? #2134

@teghnet

Description

@teghnet

Hi, I was wondering if the default command_setup.go:33

	if cmd.Usage == "" && isRoot {
		tracef("setting default Usage (cmd=%[1]q)", cmd.Name)
		cmd.Usage = "A new cli application"
	}

is really needed.

Would you accept a PR that removes it?

The default name makes a lot of sense, but the actual usage can be empty - sometimes root commands to not have flags, and then we need to put a space ( ) in the Usage field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/v2relates to / is being considered for v2kind/questionsomeone asking a question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions