helphelpers

package
v1.21.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Prepare

func Prepare(cmd *cobra.Command)

Prepare prepares cmd flag set for the invocation of its usage function by hiding flags that we want cobra to parse but we don't want to show to the user. We do this because not all flags associated with the root command are valid for all subcommands but we don't want to move them out of the root command and into subcommands, since that would change how cobra parses the command line.

For example:

dlv --headless debug

must parse successfully even though the headless flag is not applicable to the 'connect' subcommand.

Prepare is a destructive command, cmd can not be reused after it has been called.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL