command

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultFmtPackageArgument = "./..."

DefaultFmtPackageArgument is the default package argument when calling go fmt.

View Source
const DefaultStaticCheckPackageArgument = "./..."

DefaultStaticCheckPackageArgument is the default package argument when calling staticcheck.

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

DefaultTestPackageArgument is the default package argument when calling go test.

View Source
const DefaultVetPackageArgument = "./..."

DefaultVetPackageArgument is the default package argument when calling go vet.

Variables

This section is empty.

Functions

This section is empty.

Types

type All

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

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 Fmt

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

func (*Fmt) Help

func (f *Fmt) Help() string

func (*Fmt) Run

func (f *Fmt) Run(args []string) int

func (*Fmt) Synopsis

func (f *Fmt) Synopsis() string

type StaticCheck added in v0.2.0

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

func (*StaticCheck) Help added in v0.2.0

func (s *StaticCheck) Help() string

func (*StaticCheck) Run added in v0.2.0

func (s *StaticCheck) Run(args []string) int

func (*StaticCheck) Synopsis added in v0.2.0

func (s *StaticCheck) Synopsis() string

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

	// Pattern is usually a list of import paths.
	// See 'go help packages'.
	Pattern string
}

type Vet added in v0.2.0

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

func (*Vet) Help added in v0.2.0

func (f *Vet) Help() string

func (*Vet) Run added in v0.2.0

func (f *Vet) Run(args []string) int

func (*Vet) Synopsis added in v0.2.0

func (f *Vet) Synopsis() string

Jump to

Keyboard shortcuts

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