mirror of
https://github.com/kataras/iris.git
synced 2026-01-27 22:05:56 +00:00
new x/errors package to handle HTTP wire errors
This commit is contained in:
25
x/errors/aliases.go
Normal file
25
x/errors/aliases.go
Normal file
@@ -0,0 +1,25 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user