mirror of
https://github.com/kataras/iris.git
synced 2025-12-24 05:17:03 +00:00
add a new x/reflex sub-package for reflection common functions - may be improved in the near future
This commit is contained in:
8
x/reflex/error.go
Normal file
8
x/reflex/error.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package reflex
|
||||
|
||||
import "reflect"
|
||||
|
||||
// IsError reports whether "typ" is an error type.
|
||||
func IsError(typ interface{ Implements(reflect.Type) bool }) bool {
|
||||
return typ.Implements(ErrTyp)
|
||||
}
|
||||
Reference in New Issue
Block a user