spycommand

package
v0.0.0-...-6f3d572 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package spycommand is a package that contains types that are private in `command`, but needed for reference in other packages.

All class methods should go in other packages to ensure they are tested properly For example `func (ia *InputArg) DoStuff(abc)` should be in another package as `func (DoInputArgStuff(ia *InputArg, abc)`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTerminationPanic

func IsTerminationPanic(recovered any) (bool, error)

IsTerminationPanic determines if the panic was caused by a termination error.

func SnapshotsMap

func SnapshotsMap(iss ...InputSnapshot) map[InputSnapshot]bool

func Terminate

func Terminate(err error)

Terminate terminates the execution (via panic) with a `Terminator` error.

func TerminationCmpopts

func TerminationCmpopts() cmp.Option

TerminationCmpopts returns a `cmp.Option` for comparing `Terminator` objects.

Types

type InputArg

type InputArg struct {
	Value     string
	Snapshots map[InputSnapshot]bool
}

type InputSnapshot

type InputSnapshot int

type Terminator

type Terminator struct {
	TerminationError error
}

Terminator is a custom type that is passed to panic when running `o.Terminate`

func TerminationErr

func TerminationErr(err error) *Terminator

Jump to

Keyboard shortcuts

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