Help us shape the future of Go! Take the 2026 Go Developer Survey

result

package
v1.34.9 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 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 Result

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

Result contains the result tuple of an operation.

func NewResult

func NewResult[T comparable](val T, err error) *Result[T]

NewResult constructs a new result container.

func (*Result[T]) Compare

func (r *Result[T]) Compare(ot *Result[T]) bool

Compare compares two Result objects for equality.

func (*Result[T]) GetValue

func (r *Result[T]) GetValue() (val T, err error)

GetValue returns the result and error value.

Jump to

Keyboard shortcuts

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