cli

package
v29.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: Apache-2.0 Imports: 12 Imported by: 2,998

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 NoArgs

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

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

func RequiresMaxArgs

func RequiresMaxArgs(maxArgs int) cobra.PositionalArgs

RequiresMaxArgs returns an error if there is not at most max args

func RequiresMinArgs

func RequiresMinArgs(minArgs int) cobra.PositionalArgs

RequiresMinArgs returns an error if there is not at least min args

func RequiresRangeArgs

func RequiresRangeArgs(minArgs int, maxArgs int) cobra.PositionalArgs

RequiresRangeArgs returns an error if there is not at least min args and at most max args