Help us shape the future of Go! Take the 2026 Go Developer Survey

constants

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OK ExitCode = 0

	IssuesFound = 1

	WarningInTest = 2

	Failure = 3

	Timeout = 4

	NoGoFiles = 5

	NoConfigFileDetected = 6

	ErrorWasLogged = 7
)

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