pflagutil

package
v0.51.4 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyValueFlag

type KeyValueFlag struct {
	Map *map[string]string
}

KeyValueFlag can be used for users to define variables with quotes. Similar to pflag.StringArrayVar and StringToStringVar, but with different quoting.

func (*KeyValueFlag) GetSlice

func (v *KeyValueFlag) GetSlice() []string

GetSlice returns the flag value list as an array of strings.

func (*KeyValueFlag) Set

func (v *KeyValueFlag) Set(kv string) error

func (*KeyValueFlag) String

func (v *KeyValueFlag) String() string

func (*KeyValueFlag) Type

func (v *KeyValueFlag) Type() string

Type returns a descriptive name for the underlying data type. Used in the help output of pflag/cobra.

Jump to

Keyboard shortcuts

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