cmdutil

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 License: AGPL-3.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CobraStringSliceValue

type CobraStringSliceValue struct {
	// contains filtered or unexported fields
}

CobraStringSliceValue is similar to spf13.pflag.stringSliceValue but enforces allowed values

func MakeCobraStringSliceValue

func MakeCobraStringSliceValue(value *[]string, others []string) *CobraStringSliceValue

MakeCobraStringSliceValue creates a string slice value (satisfying spf13/pflag.Value interface) for a limited number of valid options

func (*CobraStringSliceValue) AllowedString

func (c *CobraStringSliceValue) AllowedString() string

AllowedString returns a comma-separated string of allowed values

func (*CobraStringSliceValue) GetSlice

func (c *CobraStringSliceValue) GetSlice() []string

GetSlice returns a current value as a string slice

func (*CobraStringSliceValue) IsSet

func (c *CobraStringSliceValue) IsSet() bool

IsSet returns a boolean flag indicating of the value was changed from defaults

func (*CobraStringSliceValue) Set

func (c *CobraStringSliceValue) Set(values string) error

Set sets a value and fails if it is not allowed

func (*CobraStringSliceValue) String

func (c *CobraStringSliceValue) String() string

func (*CobraStringSliceValue) Type

func (c *CobraStringSliceValue) Type() string

Type returns the value type as a string

type CobraStringValue

type CobraStringValue struct {
	// contains filtered or unexported fields
}

CobraStringValue is similar to spf13.pflag.stringValue but enforces allowed values

func MakeCobraStringValue

func MakeCobraStringValue(value string, others []string) *CobraStringValue

MakeCobraStringValue creates a string value (satisfying spf13/pflag.Value interface) for a limited number of valid options

func (*CobraStringValue) AllowedString

func (c *CobraStringValue) AllowedString() string

AllowedString returns a comma-separated string of allowed values

func (*CobraStringValue) IsSet

func (c *CobraStringValue) IsSet() bool

IsSet returns a boolean flag indicating of the value was changed from defaults

func (*CobraStringValue) Set

func (c *CobraStringValue) Set(other string) error

Set sets a value and fails if it is not allowed

func (*CobraStringValue) String

func (c *CobraStringValue) String() string

func (*CobraStringValue) Type

func (c *CobraStringValue) Type() string

Type returns the value type as a string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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