errors

package
v0.0.0-...-173f61c Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package errors content relative to the package

Index

Constants

View Source
const (
	// MetaLocation values used to save location information of an error.
	MetaLocation = "loc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error interface {
	AddMeta(key string, value interface{}) Error
	ThroughBy(err error) Error

	ExitStatus() int
	Error() string
	// contains filtered or unexported methods
}

Error encapsulates error info.

func CommandNotFound

func CommandNotFound(msg string, args ...interface{}) Error

CommandNotFound return a command not found error.

func IncorrectUsage

func IncorrectUsage(msg string, args ...interface{}) Error

IncorrectUsage return an incorrect usage error.

func InvalidArguments

func InvalidArguments(msg string, args ...interface{}) Error

InvalidArguments return an invalid arguments error.

func ThrowMissingRequiredLabel

func ThrowMissingRequiredLabel(block string) Error

ThrowMissingRequiredLabel throw a missing required label error.

func ThrowUnsupportedArgument

func ThrowUnsupportedArgument(block, argument string) Error

ThrowUnsupportedArgument throw an unsupported argument error.

func ThrowUnsupportedBlock

func ThrowUnsupportedBlock(parent, child string) Error

ThrowUnsupportedBlock throw an unsupported block error.

func Unexpected

func Unexpected(msg string, args ...interface{}) Error

Unexpected return an unexpectedErrCode error.

Jump to

Keyboard shortcuts

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