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

command

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTestPackageArgument = "./..."

DefaultTestPackageArgument is the default package argument when calling go test.

Variables

This section is empty.

Functions

This section is empty.

Types

type All

type All struct {
	// contains filtered or unexported fields
}

All is a composite command for running all the available commands. Usually executed when calling the CLI without arguments.

func (*All) Help

func (a *All) Help() string

func (*All) Run

func (a *All) Run(args []string) int

func (*All) Synopsis

func (a *All) Synopsis() string

type Commands

type Commands map[string]cli.CommandFactory

Commands is the mapping of all available go-toolkit commands.

func New

func New() Commands

type Test

type Test struct {
	// contains filtered or unexported fields
}

func (*Test) Help

func (t *Test) Help() string

func (*Test) ParseArgs

func (t *Test) ParseArgs(args []string) (*TestArgs, int)

func (*Test) Run

func (t *Test) Run(args []string) int

func (*Test) RunArgs

func (t *Test) RunArgs(args *TestArgs) int

RunArgs runs a go test command with opinionated defaults and custom arguments defined by TestArgs.

func (*Test) Synopsis

func (t *Test) Synopsis() string

type TestArgs

type TestArgs struct {

	// Do not start new tests after the first test failure.
	FailFast bool

	// If true, it will make testing.Short() returns true.
	// Useful for separating long-running test from the rest of the test-suite or,
	// excluding tests that should only run when building in the CI.
	Short bool

	// See 'go help packages'.
	Pattern string
}

Jump to

Keyboard shortcuts

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