result

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Output added in v0.5.0

func Output(res Result[string]) string

Output is the value an Ok carries, and empty for an Err.

It exists because a refusal has to be able to show what it refused over. The laboratory reads a failing test command as a killed mutant, so when nothing is mutated that same failure is a red baseline — and a refusal that does not print the command's own output leaves the reader guessing which of a hundred reasons a suite might be red. Measured the hard way: an embedded directory missing from a sandbox produced a refusal that named neither the file nor the pattern, and finding it took four measurements that should have been none.

Types

type Result

type Result[Type any] interface {
	String() string
	IsOk() bool
	// contains filtered or unexported methods
}

func Err

func Err[Type any](errorMessage string) Result[Type]

func Ok

func Ok[Type any](value Type) Result[Type]

Jump to

Keyboard shortcuts

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