cli

package
v25.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 16 Imported by: 2,998

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableFlagsInUseLine

func DisableFlagsInUseLine(cmd *cobra.Command)

DisableFlagsInUseLine sets the DisableFlagsInUseLine flag on all commands within the tree rooted at cmd.

func ExactArgs

func ExactArgs(number int) cobra.PositionalArgs

ExactArgs returns an error if there is not the exact number of args

func FlagErrorFunc

func FlagErrorFunc(cmd *cobra.Command, err error) error

FlagErrorFunc prints an error message which matches the format of the docker/cli/cli error messages

func HasCompletionArg

func HasCompletionArg(args []string) bool

HasCompletionArg returns true if a cobra completion arg request is found.

func NoArgs

func NoArgs(cmd *cobra.Command, args []string) error

NoArgs validates args and returns an error if there are any args