Help us shape the future of Go! Take the 2026 Go Developer Survey

flags

package
v1.233.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrFmtWrapErr is uses to format error strings.
	ErrFmtWrapErr = "%w: %v"
)

Variables

View Source
var (
	ErrFetchingFormat     = fmt.Errorf("error fetching format flag")
	ErrFetchingMaxColumns = fmt.Errorf("error fetching max-columns flag")
	ErrFetchingDelimiter  = fmt.Errorf("error fetching delimiter flag")
	ErrFetchingStack      = fmt.Errorf("error fetching stack flag")
	ErrFetchingQuery      = fmt.Errorf("error fetching query flag")
)

Error constants for flag operations.

Functions

func AddCommonListFlags

func AddCommonListFlags(cmd *cobra.Command)

AddCommonListFlags adds common flags to list commands.

Types

type CommonFlags

type CommonFlags struct {
	Format     string
	MaxColumns int
	Delimiter  string
	Stack      string
	Query      string
}

CommonFlags contains common flags for list commands.

func GetCommonListFlags

func GetCommonListFlags(cmd *cobra.Command) (*CommonFlags, error)

GetCommonListFlags gets common flags from a command.

Jump to

Keyboard shortcuts

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