value

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2020 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAppendRead  = errors.New("invalid append data to read value")
	ErrAppendEmpty = errors.New("invalid apped data to empty value")
)

Functions

func IsEmpty

func IsEmpty(v Value) bool

Types

type Any

type Any struct {
	Val  []interface{}
	Flag flag.Flag
	// contains filtered or unexported fields
}

func (*Any) Any

func (a *Any) Any() interface{}

func (*Any) Append

func (e *Any) Append(string) error

func (*Any) Bool

func (e *Any) Bool() bool

func (*Any) Bools

func (e *Any) Bools() []bool

func (*Any) Duration

func (e *Any) Duration() time.Duration

func (*Any) Durations

func (e *Any) Durations() []time.Duration

func (*Any) Float64

func (e *Any) Float64() float64

func (*Any) Float64s

func (e *Any) Float64s() []float64

func (*Any) Int

func (e *Any) Int() int

func (*Any) Int64

func (e *Any) Int64() int64

func (*Any) Int64s

func (e *Any) Int64s() []int64

func (*Any) Ints

func (e *Any) Ints() []int

func (*Any) String

func (e *Any) String() string

func (*Any) Strings

func (e *Any) Strings() []string

func (*Any) Time

func (e *Any) Time() time.Time

func (*Any) Times

func (e *Any) Times() []time.Time

func (*Any) Uint

func (e *Any) Uint() uint

func (*Any) Uint64

func (e *Any) Uint64() uint64

func (*Any) Uint64s

func (e *Any) Uint64s() []uint64

func (*Any) Uints

func (e *Any) Uints() []uint

type Append

type Append interface {
	Value
	Append(string) error
}

func ByFlag

func ByFlag(f flag.Flag) Append

func New

func New(v interface{}) Append

nolint: gocyclo

type Bool

type Bool struct {
	Val  []bool
	Flag flag.Flag
	// contains filtered or unexported fields
}

func (*Bool) Any

func (b *Bool) Any() interface{}

func (*Bool) Append

func (b *Bool) Append(in string) error

func (*Bool) Bool

func (b *Bool) Bool() bool

func (*Bool) Bools

func (b *Bool) Bools() []bool

func (*Bool) Duration

func (e *Bool) Duration() time.Duration

func (*Bool) Durations

func (e *Bool) Durations() []time.Duration

func (*Bool) Float64

func (e *Bool) Float64() float64

func (*Bool) Float64s

func (e *Bool) Float64s() []float64

func (*Bool) Int

func (e *Bool) Int() int

func (*Bool) Int64

func (e *Bool) Int64() int64

func (*Bool) Int64s

func (e *Bool) Int64s() []int64

func (*Bool) Ints

func (e *Bool) Ints() []int

func (*Bool) String

func (e *Bool) String() string

func (*Bool) Strings

func (e *Bool) Strings() []string

func (*Bool) Time

func (e *Bool) Time() time.Time

func (*Bool) Times

func (e *Bool) Times() []time.Time

func (*Bool) Uint

func (e *Bool) Uint() uint

func (*Bool) Uint64

func (e *Bool) Uint64() uint64

func (*Bool) Uint64s

func (e *Bool) Uint64s() []uint64

func (*Bool) Uints

func (e *Bool) Uints() []uint

type Duration

type Duration struct {
	Val  []time.Duration
	Flag flag.Flag
	// contains filtered or unexported fields
}

func (*Duration) Any

func (d *Duration) Any() interface{}

func (*Duration) Append

func (d *Duration) Append(in string) error

func (*Duration) Bool

func (e *Duration) Bool() bool

func (*Duration) Bools

func (e *Duration) Bools() []bool

func (*Duration) Duration

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

func (*Duration) Durations

func (d *Duration) Durations() []time.Duration

func (*Duration) Float64

func (e *Duration) Float64() float64

func (*Duration) Float64s

func (e *Duration) Float64s() []float64

func (*Duration) Int

func (e *Duration) Int() int

func (*Duration) Int64

func (e *Duration) Int64() int64

func (*Duration) Int64s

func (e *Duration) Int64s() []int64

func (*Duration) Ints

func (e *Duration) Ints() []int

func (*Duration) String

func (e *Duration) String() string

func (*Duration) Strings

func (e *Duration) Strings() []string

func (*Duration) Time

func (e *Duration) Time() time.Time

func (*Duration) Times

func (e *Duration) Times() []time.Time

func (*Duration) Uint

func (e *Duration) Uint() uint

func (*Duration) Uint64

func (e *Duration) Uint64() uint64

func (*Duration) Uint64s

func (e *Duration) Uint64s() []uint64

func (*Duration) Uints

func (e *Duration) Uints() []uint

type Float64

type Float64 struct {
	Val  []float64
	Flag flag.Flag
	// contains filtered or unexported fields
}

func (*Float64) Any

func (f *Float64) Any() interface{}

func (*Float64) Append

func (f *Float64) Append(in string) error

func (*Float64) Bool

func (e *Float64) Bool() bool

func (*Float64) Bools

func (e *Float64) Bools() []bool

func (*Float64) Duration

func (e *Float64) Duration() time.Duration

func (*Float64) Durations

func (e *Float64) Durations() []time.Duration

func (*Float64) Float64

func (f *Float64) Float64() float64

func (*Float64) Float64s

func (f *Float64) Float64s() []float64

func (*Float64) Int

func (e *Float64) Int() int

func (*Float64) Int64

func (e *Float64) Int64() int64

func (*Float64) Int64s

func (e *Float64) Int64s() []int64

func (*Float64) Ints

func (e *Float64) Ints() []int

func (*Float64) String

func (e *Float64) String() string

func (*Float64) Strings

func (e *Float64) Strings() []string

func (*Float64) Time

func (e *Float64) Time() time.Time

func (*Float64) Times

func (e *Float64) Times() []time.Time

func (*Float64) Uint

func (e *Float64) Uint() uint

func (*Float64) Uint64

func (e *Float64) Uint64() uint64

func (*Float64) Uint64s

func (e *Float64) Uint64s() []uint64

func (*Float64) Uints

func (e *Float64) Uints() []uint

type Int

type Int struct {
	Val  []int
	Flag flag.Flag
	// contains filtered or unexported fields
}

func (*Int) Any

func (i *Int) Any() interface{}

func (*Int) Append

func (i *Int) Append(in string) error

func (*Int) Bool

func (e *Int) Bool() bool

func (*Int) Bools

func (e *Int) Bools() []bool

func (*Int) Duration

func (e *Int) Duration() time.Duration

func (*Int) Durations

func (e *Int) Durations() []time.Duration

func (*Int) Float64

func (e *Int) Float64() float64

func (*Int) Float64s

func (e *Int) Float64s() []float64

func (*Int) Int

func (i *Int) Int() int

func (*Int) Int64

func (e *Int) Int64() int64

func (*Int) Int64s

func (e *Int) Int64s() []int64

func (*Int) Ints

func (i *Int) Ints() []int

func (*Int) String

func (e *Int) String() string

func (*Int) Strings

func (e *Int) Strings() []string

func (*Int) Time

func (e *Int) Time() time.Time

func (*Int) Times

func (e *Int) Times() []time.Time

func (*Int) Uint

func (e *Int) Uint() uint

func (*Int) Uint64

func (e *Int) Uint64() uint64

func (*Int) Uint64s

func (e *Int) Uint64s() []uint64

func (*Int) Uints

func (e *Int) Uints() []uint

type Int64

type Int64 struct {
	Val  []int64
	Flag flag.Flag
	// contains filtered or unexported fields
}

func (*Int64) Any

func (i *Int64) Any() interface{}

func (*Int64) Append

func (i *Int64) Append(in string) error

func (*Int64) Bool

func (e *Int64) Bool() bool

func (*Int64) Bools

func (e *Int64) Bools() []bool

func (*Int64) Duration

func (e *Int64) Duration() time.Duration

func (*Int64) Durations

func (e *Int64) Durations() []time.Duration

func (*Int64) Float64

func (e *Int64) Float64() float64

func (*Int64) Float64s

func (e *Int64) Float64s() []float64

func (*Int64) Int

func (e *Int64) Int() int

func (*Int64) Int64

func (i *Int64) Int64() int64

func (*Int64) Int64s

func (i *Int64) Int64s() []int64

func (*Int64) Ints

func (e *Int64) Ints() []int

func (*Int64) String

func (e *Int64) String() string

func (*Int64) Strings

func (e *Int64) Strings() []string

func (*Int64) Time

func (e *Int64) Time() time.Time

func (*Int64) Times

func (e *Int64) Times() []time.Time

func (*Int64) Uint

func (e *Int64) Uint() uint

func (*Int64) Uint64

func (e *Int64) Uint64() uint64

func (*Int64) Uint64s

func (e *Int64) Uint64s() []uint64

func (*Int64) Uints

func (e *Int64) Uints() []uint

type Read

type Read struct {
	Value
}

func (*Read) Append

func (r *Read) Append(string) error

type String

type String struct {
	Val  []string
	Flag flag.Flag
	// contains filtered or unexported fields
}

func (*String) Any

func (s *String) Any() interface{}

func (*String) Append

func (s *String) Append(in string) error

func (*String) Bool

func (e *String) Bool() bool

func (*String) Bools

func (e *String) Bools() []bool

func (*String) Duration

func (e *String) Duration() time.Duration

func (*String) Durations

func (e *String) Durations() []time.Duration

func (*String) Float64

func (e *String) Float64() float64

func (*String) Float64s

func (e *String) Float64s() []float64

func (*String) Int

func (e *String) Int() int

func (*String) Int64

func (e *String) Int64() int64

func (*String) Int64s

func (e *String) Int64s() []int64

func (*String) Ints

func (e *String) Ints() []int

func (*String) String

func (s *String) String() string

func (*String) Strings

func (s *String) Strings() []string

func (*String) Time

func (e *String) Time() time.Time

func (*String) Times

func (e *String) Times() []time.Time

func (*String) Uint

func (e *String) Uint() uint

func (*String) Uint64

func (e *String) Uint64() uint64

func (*String) Uint64s

func (e *String) Uint64s() []uint64

func (*String) Uints

func (e *String) Uints() []uint

type Time

type Time struct {
	Val  []time.Time
	Flag flag.Flag
	// contains filtered or unexported fields
}

func (*Time) Amy

func (t *Time) Amy() interface{}

func (*Time) Any

func (e *Time) Any() interface{}

func (*Time) Append

func (t *Time) Append(in string) error

func (*Time) Bool

func (e *Time) Bool() bool

func (*Time) Bools

func (e *Time) Bools() []bool

func (*Time) Duration

func (e *Time) Duration() time.Duration

func (*Time) Durations

func (e *Time) Durations() []time.Duration

func (*Time) Float64

func (e *Time) Float64() float64

func (*Time) Float64s

func (e *Time) Float64s() []float64

func (*Time) Int

func (e *Time) Int() int

func (*Time) Int64

func (e *Time) Int64() int64

func (*Time) Int64s

func (e *Time) Int64s() []int64

func (*Time) Ints

func (e *Time) Ints() []int

func (*Time) String

func (e *Time) String() string

func (*Time) Strings

func (e *Time) Strings() []string

func (*Time) Time

func (t *Time) Time() time.Time

func (*Time) Times

func (t *Time) Times() []time.Time

func (*Time) Uint

func (e *Time) Uint() uint

func (*Time) Uint64

func (e *Time) Uint64() uint64

func (*Time) Uint64s

func (e *Time) Uint64s() []uint64

func (*Time) Uints

func (e *Time) Uints() []uint

type Uint

type Uint struct {
	Val  []uint
	Flag flag.Flag
	// contains filtered or unexported fields
}

func (*Uint) Any

func (u *Uint) Any() interface{}

func (*Uint) Append

func (u *Uint) Append(in string) error

func (*Uint) Bool

func (e *Uint) Bool() bool

func (*Uint) Bools

func (e *Uint) Bools() []bool

func (*Uint) Duration

func (e *Uint) Duration() time.Duration

func (*Uint) Durations

func (e *Uint) Durations() []time.Duration

func (*Uint) Float64

func (e *Uint) Float64() float64

func (*Uint) Float64s

func (e *Uint) Float64s() []float64

func (*Uint) Int

func (e *Uint) Int() int

func (*Uint) Int64

func (e *Uint) Int64() int64

func (*Uint) Int64s

func (e *Uint) Int64s() []int64

func (*Uint) Ints

func (e *Uint) Ints() []int

func (*Uint) String

func (e *Uint) String() string

func (*Uint) Strings

func (e *Uint) Strings() []string

func (*Uint) Time

func (e *Uint) Time() time.Time

func (*Uint) Times

func (e *Uint) Times() []time.Time

func (*Uint) Uint

func (u *Uint) Uint() uint

func (*Uint) Uint64

func (e *Uint) Uint64() uint64

func (*Uint) Uint64s

func (e *Uint) Uint64s() []uint64

func (*Uint) Uints

func (u *Uint) Uints() []uint

type Uint64

type Uint64 struct {
	Val  []uint64
	Flag flag.Flag
	// contains filtered or unexported fields
}

func (*Uint64) Any

func (u *Uint64) Any() interface{}

func (*Uint64) Append

func (u *Uint64) Append(in string) error

func (*Uint64) Bool

func (e *Uint64) Bool() bool

func (*Uint64) Bools

func (e *Uint64) Bools() []bool

func (*Uint64) Duration

func (e *Uint64) Duration() time.Duration

func (*Uint64) Durations

func (e *Uint64) Durations() []time.Duration

func (*Uint64) Float64

func (e *Uint64) Float64() float64

func (*Uint64) Float64s

func (e *Uint64) Float64s() []float64

func (*Uint64) Int

func (e *Uint64) Int() int

func (*Uint64) Int64

func (e *Uint64) Int64() int64

func (*Uint64) Int64s

func (e *Uint64) Int64s() []int64

func (*Uint64) Ints

func (e *Uint64) Ints() []int

func (*Uint64) String

func (e *Uint64) String() string

func (*Uint64) Strings

func (e *Uint64) Strings() []string

func (*Uint64) Time

func (e *Uint64) Time() time.Time

func (*Uint64) Times

func (e *Uint64) Times() []time.Time

func (*Uint64) Uint

func (e *Uint64) Uint() uint

func (*Uint64) Uint64

func (u *Uint64) Uint64() uint64

func (*Uint64) Uint64s

func (u *Uint64) Uint64s() []uint64

func (*Uint64) Uints

func (e *Uint64) Uints() []uint

type Value

type Value interface {
	String() string
	Int() int
	Int64() int64
	Uint() uint
	Uint64() uint64
	Float64() float64
	Bool() bool
	Duration() time.Duration
	Time() time.Time
	Any() interface{}

	Strings() []string
	Ints() []int
	Int64s() []int64
	Uints() []uint
	Uint64s() []uint64
	Float64s() []float64
	Bools() []bool
	Durations() []time.Duration
	Times() []time.Time
}

func Empty

func Empty() Value

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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