constants

package
v0.9.3-beta Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DevctlEnvKey            = "DEVCTL_ENV"
	DevctlEnvRootKey        = "DEVCTL_ROOT"
	DevctlEnvPluginPathKey  = "DEVCTL_PLUGIN_PATH"
	DevctlEnvPluginCacheKey = "DEVCTL_PLUGIN_CACHE"
)
View Source
const (
	OK ExitCode = 0

	IssuesFound = 1

	WarningInTest = 2

	Failure = 3

	Timeout = 4

	NoGoFiles = 5

	NoConfigFileDetected = 6

	ErrorWasLogged = 7
)
View Source
const (
	LoadPluginsEvent = "LoadPlugins"
)
View Source
const (
	VersionV1 = "v1"
)

Variables

View Source
var (
	// ErrNoGoFiles is the pre-defined ExitError NoGoFiles
	ErrNoGoFiles = &ExitError{
		Message:  "no go files to analyze",
		ExitCode: NoGoFiles,
	}
	// ErrFailure is the pre-defined ExitError Failure
	ErrFailure = &ExitError{
		Message:  "failed to analyze",
		ExitCode: Failure,
	}
)

Functions

func ExitWithError

func ExitWithError(code int, err error)

ExitWithError prints an error message and exits the application with ErrorCode: code

Types

type ExitCode

type ExitCode int

type ExitError

type ExitError struct {
	ExitCode ExitCode
	Message  string
}

func (ExitError) Code

func (e ExitError) Code() int

Code returns the ExitCode as int of the ExitError

func (ExitError) Error

func (e ExitError) Error() string

Jump to

Keyboard shortcuts

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