mirror of
https://github.com/octoleo/restic.git
synced 2024-05-28 14:40:49 +00:00
24 lines
556 B
Go
24 lines
556 B
Go
package errors
|
|
|
|
import "github.com/pkg/errors"
|
|
|
|
// Cause returns the cause of an error.
|
|
func Cause(err error) error {
|
|
return errors.Cause(err)
|
|
}
|
|
|
|
// New creates a new error based on message.
|
|
func New(message string) error {
|
|
return errors.New(message)
|
|
}
|
|
|
|
// Errorf creates an error based on a format string and values.
|
|
func Errorf(format string, args ...interface{}) error {
|
|
return errors.Errorf(format, args...)
|
|
}
|
|
|
|
// Wrap wraps an error retrieved from outside of restic.
|
|
func Wrap(err error, message string) error {
|
|
return errors.Wrap(err, message)
|
|
}
|