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

errors

package
v3.5.6 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// ErrorGeneric is returned for generic error
	ErrorGeneric = 20
)

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error)

CheckError logs a fatal message and exits with ErrorGeneric if err is not nil

func Fatal

func Fatal(exitcode int, args ...any)

Fatal is a wrapper for logrus.Fatal() to exit with custom code

func Fatalf

func Fatalf(exitcode int, format string, args ...any)

Fatalf is a wrapper for logrus.Fatalf() to exit with custom code

func IsCredentialsConfigurationError

func IsCredentialsConfigurationError(err error) bool

IsCredentialsConfigurationError checks if the given error is a wrapped credentials configuration error.

func NewCredentialsConfigurationError

func NewCredentialsConfigurationError(err error) error

NewCredentialsConfigurationError wraps any error into a credentials configuration error.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(t *testing.T) *Handler

func (*Handler) FailOnErr

func (h *Handler) FailOnErr(v any, err error) any

FailOnErr fails the test if there is an error. It returns the first value so you can use it if you cast it: text := FailOrErr(Foo).(string)

Jump to

Keyboard shortcuts

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