// Wrap returns err wrapped in a go-error. If err is nil, returns nil. func Wrap(err interface{ … } // WrapPrefixf returns err wrapped in a go-error with a message prefix. If err is nil, returns nil. func WrapPrefixf(err interface{ … } // Errorf returns a new go-error. func Errorf(msg string, args ...interface{ … } // As finds the targeted error in any wrapped error. func As(err error, target interface{ … } // Is detects whether the error is equal to a given error. func Is(err error, target error) bool { … } // GetStack returns a stack trace for the error if it has one func GetStack(err error) string { … }