flags

package
v1.1.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 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 MapStringBool

type MapStringBool struct {
	Map *map[string]bool
	// contains filtered or unexported fields
}

MapStringBool can be set from the command line with the format `--flag "string=bool"`. Multiple comma-separated key-value pairs in a single invocation are supported. For example: `--flag "a=true,b=false"`. Multiple flag invocations are supported. For example: `--flag "a=true" --flag "b=false"`.

func NewMapStringBool

func NewMapStringBool(m *map[string]bool) *MapStringBool

NewMapStringBool takes a pointer to a map[string]string and returns the MapStringBool flag parsing shim for that map

func (*MapStringBool) Empty

func (m *MapStringBool) Empty() bool

Empty implements OmitEmpty

func (*MapStringBool) Set

func (m *MapStringBool) Set(value string) error

Set implements github.com/spf13/pflag.Value

func (*MapStringBool) String

func (m *MapStringBool) String() string

String implements github.com/spf13/pflag.Value

func (*MapStringBool) Type

func (*MapStringBool) Type() string

Type implements github.com/spf13/pflag.Value

Jump to

Keyboard shortcuts

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