result

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 what the command printed, whichever way it ended.

It answered only for an Ok until the command's own package scope had to be read: that scope is announced by `go test -json` on the stream of a GREEN suite, and a green suite is an Err — so the one run whose output the scope check needs was the one this refused to answer for. The name and the contract now say the same thing: the output belongs to the command, not to the verdict.

What the Ok side is for is unchanged, and it was measured the hard way: the laboratory reads a failing command as a killed mutant, so a refusal to score a red baseline has to show the command's own words — the first version named neither the file nor the pattern, and finding the embedded directory behind 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