result

package
v0.0.0-...-7232a66 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterfaceResult

type InterfaceResult struct {
	Result interface{}
	Err    error
}

func NewInterfaceResult

func NewInterfaceResult(result interface{}, err error) *InterfaceResult

func (*InterfaceResult) Unwrap

func (ain *InterfaceResult) Unwrap() interface{}

func (*InterfaceResult) Unwrap_Or

func (ain *InterfaceResult) Unwrap_Or(v interface{}) interface{}

func (*InterfaceResult) Unwrap_Or_Else

func (ain *InterfaceResult) Unwrap_Or_Else(f func() interface{}) interface{}

type Iterator

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

func NewIterator

func NewIterator(data []interface{}) *Iterator

func (*Iterator) HasNext

func (ain *Iterator) HasNext() bool

func (*Iterator) Next

func (ain *Iterator) Next() (ret interface{})

type Result

type Result interface {
	Unwrap()
}

type SliceResult

type SliceResult struct {
	Result []interface{}
	Err    error
}

func NewSliceResult

func NewSliceResult(result []interface{}, err error) *SliceResult

func (*SliceResult) Iter

func (ain *SliceResult) Iter() *Iterator

func (*SliceResult) Unwrap

func (ain *SliceResult) Unwrap() []interface{}

func (*SliceResult) Unwrap_Or

func (ain *SliceResult) Unwrap_Or(v []interface{}) []interface{}

type StringResult

type StringResult struct {
	Result string
	Err    error
}

func NewStringResult

func NewStringResult(result string, err error) *StringResult

func (*StringResult) Unwrap

func (ain *StringResult) Unwrap() string

func (*StringResult) Unwrap_Or

func (ain *StringResult) Unwrap_Or(str string) string

func (*StringResult) Unwrap_Or_Else

func (ain *StringResult) Unwrap_Or_Else(f func() string) string

Jump to

Keyboard shortcuts

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