either

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 13, 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 Either

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

func Err

func Err[T any](err error) Either[T]

func Fmap

func Fmap[T any, R any](et Either[T], f func(x T) R) Either[R]

func Ok

func Ok[T any](x T) Either[T]

func (*Either[T]) IsOk

func (et *Either[T]) IsOk() bool

func (Either[T]) Unwrap

func (et Either[T]) Unwrap() T

func (Either[T]) UnwrapErr

func (et Either[T]) UnwrapErr() error

Jump to

Keyboard shortcuts

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