value

package
v0.0.0-...-94a580d Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppendSlice

type AppendSlice []string

AppendSlice implements the flag.Value interface and allows multiple calls to the same variable to append a list.

func (*AppendSlice) Get

func (s *AppendSlice) Get() []string

Get returns the actual underlying value

func (*AppendSlice) RawSet

func (s *AppendSlice) RawSet(value string)

RawSet sets the underlying value directly

func (*AppendSlice) Set

func (s *AppendSlice) Set(value string) error

Set implements the flag.Value interface.

func (*AppendSlice) String

func (s *AppendSlice) String() string

String implements the flag.Value interface. [ TODO ] ensure there are no bugs when the slice has an empty string

type Bool

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

Bool provides a flag value that's aware if it has been set.

func (*Bool) Get

func (b *Bool) Get() bool

Get returns the actual underlying value

func (*Bool) IsBoolFlag

func (b *Bool) IsBoolFlag() bool

IsBoolFlag is an optional method of the flag.Value interface which marks this value as boolean when the return value is true. See flag.Value for details.

func (*Bool) Merge

func (b *Bool) Merge(onto *bool)

Merge will overlay this value if it has been set.

func (*Bool) RawSet

func (b *Bool) RawSet(v bool)

RawSet sets the underlying value directly

func (*Bool) Set

func (b *Bool) Set(v string) error

Set implements the flag.Value interface.

func (*Bool) String

func (b *Bool) String() string

String implements the flag.Value interface.

type Duration

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

Duration provides a flag value that's aware if it has been set.

func (*Duration) Get

func (d *Duration) Get() time.Duration

Get returns the actual underlying value

func (*Duration) Merge

func (d *Duration) Merge(onto *time.Duration)

Merge will overlay this value if it has been set.

func (*Duration) RawSet

func (d *Duration) RawSet(v time.Duration)

RawSet sets the underlying value directly

func (*Duration) Set

func (d *Duration) Set(v string) error

Set implements the flag.Value interface.

func (*Duration) String

func (d *Duration) String() string

String implements the flag.Value interface.

type FlagMap

type FlagMap map[string]string

FlagMap is a flag implementation used to provide key=value semantics multiple times.

func (*FlagMap) Get

func (h *FlagMap) Get() map[string]string

Get returns the actual underlying value

func (*FlagMap) RawSet

func (h *FlagMap) RawSet(key, value string)

RawSet sets the underlying value directly

func (*FlagMap) Set

func (h *FlagMap) Set(value string) error

Set implements the flag.Value interface.

func (*FlagMap) String

func (h *FlagMap) String() string

String implements the flag.Value interface. [ TODO ] => maybe pretty print this value

type String

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

String provides a flag value that's aware if it has been set.

func (*String) Get

func (s *String) Get() string

Get returns the actual underlying value

func (*String) Merge

func (s *String) Merge(onto *string)

Merge will overlay this value if it has been set.

func (*String) RawSet

func (s *String) RawSet(v string)

RawSet sets the underlying value directly

func (*String) Set

func (s *String) Set(v string) error

Set implements the flag.Value interface.

func (*String) String

func (s *String) String() string

String implements the flag.Value interface.

type Uint

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

Uint provides a flag value that's aware if it has been set.

func (*Uint) Get

func (u *Uint) Get() uint

Get returns the actual underlying value

func (*Uint) Merge

func (u *Uint) Merge(onto *uint)

Merge will overlay this value if it has been set.

func (*Uint) RawSet

func (u *Uint) RawSet(v uint)

RawSet sets the underlying value directly

func (*Uint) Set

func (u *Uint) Set(v string) error

Set implements the flag.Value interface.

func (*Uint) String

func (u *Uint) String() string

String implements the flag.Value interface.

Jump to

Keyboard shortcuts

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