command

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: ISC Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Success is the exit code when a command execution is successful.
	Success int = iota
	// GenericError is the generic exit code when something fails.
	GenericError
	// ConfigError is the exit code when reading or writing the config file fails.
	ConfigError
	// 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
	// GPGError is the exit code when a gpg command fails.
	GPGError
	// GitHubError is the exit code when a GitHub request fails.
	GitHubError
	// ChangelogError is the exit code when generating the changelog fails.
	ChangelogError
	// InputError is the exist code when asking for a user input fails.
	InputError
	// ArchiveError is the exit code when extracting an archive file fails.
	ArchiveError
	// TemplateError is the exit code when reading or executing a template fails.
	TemplateError
	// CompileError is the exit code when compiling a package/file fails.
	CompileError
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PreflightChecklist

type PreflightChecklist struct {
	GPG bool
	Git bool
	Go  bool
}

PreflightChecklist is a list of common preflight checks for commands.

type PreflightInfo

type PreflightInfo struct {
	WorkingDirectory string

	GPG struct {
		Version string
	}

	Git struct {
		Version string
	}

	Go struct {
		Version 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
code
monorepo
project

Jump to

Keyboard shortcuts

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