...

Package errors

import "sigs.k8s.io/kustomize/kyaml/errors"
Overview
Index

Overview ▾

Package errors provides libraries for working with the go-errors/errors library.

func As

func As(err error, target interface{}) bool

As finds the targeted error in any wrapped error.

func Errorf

func Errorf(msg string, args ...interface{}) error

Errorf returns a new go-error.

func GetStack

func GetStack(err error) string

GetStack returns a stack trace for the error if it has one

func Is

func Is(err error, target error) bool

Is detects whether the error is equal to a given error.

func Wrap

func Wrap(err interface{}) error

Wrap returns err wrapped in a go-error. If err is nil, returns nil.

func WrapPrefixf

func WrapPrefixf(err interface{}, msg string, args ...interface{}) error

WrapPrefixf returns err wrapped in a go-error with a message prefix. If err is nil, returns nil.