Go reflect. How to check whether reflect.Type is an error type?
In Go error
is not something special. error
is just a predeclared interface type so it doesn't have its own Kind in reflect.
Try something along:
errorInterface := reflect.TypeOf((*error)(nil)).Elem()
...
case reflect.Interface:
if typOute.Implements(errorInterface) // it's an error