helpers

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: MIT Imports: 0 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeChannels

func MergeChannels[A any](channels ...<-chan A) <-chan A

Types

type Nothing

type Nothing struct{}

type Result

type Result[T any] struct {
	// contains filtered or unexported fields
}

func NewErrorResult

func NewErrorResult[T any](err error) Result[T]

func NewResult

func NewResult[T any](value T, err error) Result[T]

func NewValueResult

func NewValueResult[T any](value T) Result[T]

func (Result[T]) Ok

func (r Result[T]) Ok() bool

func (Result[T]) Unwrap

func (r Result[T]) Unwrap() T

func (Result[T]) Value

func (r Result[T]) Value() (T, error)

func (Result[T]) ValueOr

func (r Result[T]) ValueOr(v T) T

Jump to

Keyboard shortcuts

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