optional: github.com/antihax/optional Index | Files

package optional

import "github.com/antihax/optional"

Index

Package Files

bool.go byte.go complex128.go complex64.go float32.go float64.go int.go int16.go int32.go int64.go int8.go interface.go rune.go string.go time.go uint.go uint16.go uint32.go uint64.go uint8.go uintptr.go

type Bool Uses

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

func EmptyBool Uses

func EmptyBool() Bool

EmptyBool returns a new Bool that does not have a value set.

func NewBool Uses

func NewBool(value bool) Bool

func (Bool) Default Uses

func (b Bool) Default(defaultValue bool) bool

func (Bool) IsSet Uses

func (b Bool) IsSet() bool

func (Bool) Value Uses

func (b Bool) Value() bool

type Byte Uses

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

func EmptyByte Uses

func EmptyByte() Byte

EmptyByte returns a new Byte that does not have a value set.

func NewByte Uses

func NewByte(value byte) Byte

func (Byte) Default Uses

func (b Byte) Default(defaultValue byte) byte

func (Byte) IsSet Uses

func (b Byte) IsSet() bool

func (Byte) Value Uses

func (b Byte) Value() byte

type Complex128 Uses

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

func EmptyComplex128 Uses

func EmptyComplex128() Complex128

EmptyComplex128 returns a new Complex128 that does not have a value set.

func NewComplex128 Uses

func NewComplex128(value complex128) Complex128

func (Complex128) Default Uses

func (i Complex128) Default(defaultValue complex128) complex128

func (Complex128) IsSet Uses

func (i Complex128) IsSet() bool

func (Complex128) Value Uses

func (i Complex128) Value() complex128

type Complex64 Uses

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

func EmptyComplex64 Uses

func EmptyComplex64() Complex64

EmptyComplex64 returns a new Complex64 that does not have a value set.

func NewComplex64 Uses

func NewComplex64(value complex64) Complex64

func (Complex64) Default Uses

func (i Complex64) Default(defaultValue complex64) complex64

func (Complex64) IsSet Uses

func (i Complex64) IsSet() bool

func (Complex64) Value Uses

func (i Complex64) Value() complex64

type Float32 Uses

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

func EmptyFloat32 Uses

func EmptyFloat32() Float32

EmptyFloat32 returns a new Float32 that does not have a value set.

func NewFloat32 Uses

func NewFloat32(value float32) Float32

func (Float32) Default Uses

func (i Float32) Default(defaultValue float32) float32

func (Float32) IsSet Uses

func (i Float32) IsSet() bool

func (Float32) Value Uses

func (i Float32) Value() float32

type Float64 Uses

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

func EmptyFloat64 Uses

func EmptyFloat64() Float64

EmptyFloat64 returns a new Float64 that does not have a value set.

func NewFloat64 Uses

func NewFloat64(value float64) Float64

func (Float64) Default Uses

func (i Float64) Default(defaultValue float64) float64

func (Float64) IsSet Uses

func (i Float64) IsSet() bool

func (Float64) Value Uses

func (i Float64) Value() float64

type Int Uses

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

func EmptyInt Uses

func EmptyInt() Int

EmptyInt returns a new Int that does not have a value set.

func NewInt Uses

func NewInt(value int) Int

func (Int) Default Uses

func (i Int) Default(defaultValue int) int

func (Int) IsSet Uses

func (i Int) IsSet() bool

func (Int) Value Uses

func (i Int) Value() int

type Int16 Uses

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

func EmptyInt16 Uses

func EmptyInt16() Int16

EmptyInt16 returns a new Int16 that does not have a value set.

func NewInt16 Uses

func NewInt16(value int16) Int16

func (Int16) Default Uses

func (i Int16) Default(defaultValue int16) int16

func (Int16) IsSet Uses

func (i Int16) IsSet() bool

func (Int16) Value Uses

func (i Int16) Value() int16

type Int32 Uses

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

func EmptyInt32 Uses

func EmptyInt32() Int32

EmptyInt32 returns a new Int32 that does not have a value set.

func NewInt32 Uses

func NewInt32(value int32) Int32

func (Int32) Default Uses

func (i Int32) Default(defaultValue int32) int32

func (Int32) IsSet Uses

func (i Int32) IsSet() bool

func (Int32) Value Uses

func (i Int32) Value() int32

type Int64 Uses

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

func EmptyInt64 Uses

func EmptyInt64() Int64

EmptyInt64 returns a new Int64 that does not have a value set.

func NewInt64 Uses

func NewInt64(value int64) Int64

func (Int64) Default Uses

func (i Int64) Default(defaultValue int64) int64

func (Int64) IsSet Uses

func (i Int64) IsSet() bool

func (Int64) Value Uses

func (i Int64) Value() int64

type Int8 Uses

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

func EmptyInt8 Uses

func EmptyInt8() Int8

EmptyInt8 returns a new Int8 that does not have a value set.

func NewInt8 Uses

func NewInt8(value int8) Int8

func (Int8) Default Uses

func (i Int8) Default(defaultValue int8) int8

func (Int8) IsSet Uses

func (i Int8) IsSet() bool

func (Int8) Value Uses

func (i Int8) Value() int8

type Interface Uses

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

Optional represents a generic optional type, stored as an interface{}.

func EmptyInterface Uses

func EmptyInterface() Interface

EmptyInterface returns a new Interface that does not have a value set.

func NewInterface Uses

func NewInterface(value interface{}) Interface

func (Interface) Default Uses

func (b Interface) Default(defaultValue interface{}) interface{}

func (Interface) IsSet Uses

func (b Interface) IsSet() bool

func (Interface) Value Uses

func (b Interface) Value() interface{}

type Rune Uses

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

func EmptyRune Uses

func EmptyRune() Rune

EmptyRune returns a new Rune that does not have a value set.

func NewRune Uses

func NewRune(value rune) Rune

func (Rune) Default Uses

func (b Rune) Default(defaultValue rune) rune

func (Rune) IsSet Uses

func (b Rune) IsSet() bool

func (Rune) Value Uses

func (b Rune) Value() rune

type String Uses

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

func EmptyString Uses

func EmptyString() String

EmptyString returns a new String that does not have a value set.

func NewString Uses

func NewString(value string) String

func (String) Default Uses

func (b String) Default(defaultValue string) string

func (String) IsSet Uses

func (b String) IsSet() bool

func (String) Value Uses

func (b String) Value() string

type Time Uses

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

func EmptyTime Uses

func EmptyTime() Time

EmptyTime returns a new Time that does not have a value set.

func NewTime Uses

func NewTime(value time.Time) Time

func (Time) Default Uses

func (b Time) Default(defaultValue time.Time) time.Time

func (Time) IsSet Uses

func (b Time) IsSet() bool

func (Time) Value Uses

func (b Time) Value() time.Time

type Uint Uses

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

func EmptyUint Uses

func EmptyUint() Uint

EmptyUint returns a new Uint that does not have a value set.

func NewUint Uses

func NewUint(value uint) Uint

func (Uint) Default Uses

func (i Uint) Default(defaultValue uint) uint

func (Uint) IsSet Uses

func (i Uint) IsSet() bool

func (Uint) Value Uses

func (i Uint) Value() uint

type Uint16 Uses

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

func EmptyUint16 Uses

func EmptyUint16() Uint16

EmptyUint16 returns a new Uint16 that does not have a value set.

func NewUint16 Uses

func NewUint16(value uint16) Uint16

func (Uint16) Default Uses

func (i Uint16) Default(defaultValue uint16) uint16

func (Uint16) IsSet Uses

func (i Uint16) IsSet() bool

func (Uint16) Value Uses

func (i Uint16) Value() uint16

type Uint32 Uses

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

func EmptyUint32 Uses

func EmptyUint32() Uint32

EmptyUint32 returns a new Uint32 that does not have a value set.

func NewUint32 Uses

func NewUint32(value uint32) Uint32

func (Uint32) Default Uses

func (i Uint32) Default(defaultValue uint32) uint32

func (Uint32) IsSet Uses

func (i Uint32) IsSet() bool

func (Uint32) Value Uses

func (i Uint32) Value() uint32

type Uint64 Uses

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

func EmptyUint64 Uses

func EmptyUint64() Uint64

EmptyUint64 returns a new Uint64 that does not have a value set.

func NewUint64 Uses

func NewUint64(value uint64) Uint64

func (Uint64) Default Uses

func (i Uint64) Default(defaultValue uint64) uint64

func (Uint64) IsSet Uses

func (i Uint64) IsSet() bool

func (Uint64) Value Uses

func (i Uint64) Value() uint64

type Uint8 Uses

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

func EmptyUint8 Uses

func EmptyUint8() Uint8

EmptyUint8 returns a new Uint8 that does not have a value set.

func NewUint8 Uses

func NewUint8(value uint8) Uint8

func (Uint8) Default Uses

func (i Uint8) Default(defaultValue uint8) uint8

func (Uint8) IsSet Uses

func (i Uint8) IsSet() bool

func (Uint8) Value Uses

func (i Uint8) Value() uint8

type Uintptr Uses

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

func EmptyUintptr Uses

func EmptyUintptr() Uintptr

EmptyUintptr returns a new Uintptr that does not have a value set.

func NewUintptr Uses

func NewUintptr(value uintptr) Uintptr

func (Uintptr) Default Uses

func (i Uintptr) Default(defaultValue uintptr) uintptr

func (Uintptr) IsSet Uses

func (i Uintptr) IsSet() bool

func (Uintptr) Value Uses

func (i Uintptr) Value() uintptr

Package optional imports 1 packages (graph) and is imported by 147 packages. Updated 2019-10-16. Refresh now. Tools for package owners.