command

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: ISC Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Success is the exit code when a command execution is successful.
	Success int = iota
	// SpecError is the exit code when reading the spec file fails.
	SpecError
	// FlagError is the exit code when an undefined or invalid flag is provided to a command.
	FlagError
	// PreflightError is the exit code when a preflight check fails.
	PreflightError
	// OSError is the exit code when an OS operation fails.
	OSError
	// GoError is the exit code when a go command fails.
	GoError
	// GitError is the exit code when a git command fails.
	GitError
	// GitHubError is the exit code when a GitHub operation fails.
	GitHubError
	// ChangelogError is the exit code when generating the changelog fails.
	ChangelogError
	// DecorationError is the exit code when decorating an application fails.
	DecorationError
	// UnsupportedError is the exit code when a capability is not supported.
	UnsupportedError
	// MiscError is the exit code when a miscellaneous operation fails.
	MiscError
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PreflightChecklist

type PreflightChecklist struct {
	Go  bool
	Git bool
}

PreflightChecklist is a list of common preflight checks for commands.

type PreflightInfo

type PreflightInfo struct {
	Context struct {
		WorkingDirectory string
	}
	Go struct {
		Version string
	}
	Git struct {
		Remote struct {
			Domain string
			Path   string
		}
	}
}

PreflightInfo is a list of common preflight information for commands.

func RunPreflightChecks

func RunPreflightChecks(ctx context.Context, checklist PreflightChecklist) (PreflightInfo, error)

RunPreflightChecks runs a list of preflight checks to ensure they are fulfilled. It returns a list of preflight information.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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