mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +01:00
26 lines
495 B
Go
26 lines
495 B
Go
package errors
|
|
|
|
import (
|
|
"errors"
|
|
"fmt"
|
|
)
|
|
|
|
var (
|
|
// Is is an alias of the standard errors.Is function.
|
|
Is = errors.Is
|
|
// As is an alias of the standard errors.As function.
|
|
As = errors.As
|
|
// New is an alias of the standard errors.New function.
|
|
New = errors.New
|
|
// Unwrap is an alias of the standard errors.Unwrap function.
|
|
Unwrap = errors.Unwrap
|
|
)
|
|
|
|
func sprintf(format string, args ...interface{}) string {
|
|
if len(args) > 0 {
|
|
return fmt.Sprintf(format, args...)
|
|
}
|
|
|
|
return format
|
|
}
|