cmd

package
v0.0.0-...-989785b Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package cmd provides an Exiter and a test exiter, great for testing command main() functions.

Index

Constants

View Source
const (
	// ExitCodeInvalidUsage is an exit code indicating invalid command line arguments were provided
	ExitCodeInvalidUsage = 2
)

Variables

This section is empty.

Functions

func Exit

func Exit(code int)

Exit runs os.Exit(). If SetupTestExiter() has been called, it panics instead.

func SetupTestExiter

func SetupTestExiter(t *testing.T)

SetupTestExiter changes the exiter to panic instead of exiting

Types

This section is empty.

Directories

Path Synopsis
Command gendoc generates the root package's documentation.
Command gendoc generates the root package's documentation.
Command watch generates docs and starts an HTTP endpoint to serve them.
Command watch generates docs and starts an HTTP endpoint to serve them.

Jump to

Keyboard shortcuts

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