functional

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default[T comparable](value T, defaultValue T) T

Types

type Either

type Either[L, R any] struct {
	// contains filtered or unexported fields
}

func Left

func Left[L, R any](value L) Either[L, R]
func Right[L, R any](value R) Either[L, R]

func (*Either[L, R]) IsLeft

func (e *Either[L, R]) IsLeft() bool

func (*Either[L, R]) IsRight

func (e *Either[L, R]) IsRight() bool

func (*Either[L, R]) Left

func (e *Either[L, R]) Left() (L, bool)

func (*Either[L, R]) Right

func (e *Either[L, R]) Right() (R, bool)

func (*Either[L, R]) UnmarshalJSON

func (e *Either[L, R]) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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