flag

package
v0.0.0-...-f2e513f Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Choices

type Choices struct {
	Choices []string
	Value   string
}

func NewChoices

func NewChoices(choices []string, def string) Choices

NewChoices represents a string flag with restricted values

func (Choices) Completion

func (c Choices) Completion(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

func (*Choices) Set

func (c *Choices) Set(arg string) error

func (*Choices) String

func (c *Choices) String() string

func (*Choices) Type

func (c *Choices) Type() string

Jump to

Keyboard shortcuts

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