1
0
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:
Gerasimos (Makis) Maropoulos
2022-03-06 17:11:56 +02:00
parent fc2f8f4776
commit 410e5eae83
7 changed files with 224 additions and 0 deletions

8
x/reflex/error.go Normal file
View 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)
}