Source File
wrap.go
Belonging Package
golang.org/x/xerrors
package xerrors
import (
)
Unwrap() error
}
func ( error, interface{}) bool {
if == nil {
panic("errors: target cannot be nil")
}
:= reflect.ValueOf()
:= .Type()
if .Kind() != reflect.Ptr || .IsNil() {
panic("errors: target must be a non-nil pointer")
}
if := .Elem(); .Kind() != reflect.Interface && !.Implements(errorType) {
panic("errors: *target must be interface or implement error")
}
:= .Elem()
for != nil {
if reflect.TypeOf().AssignableTo() {
.Elem().Set(reflect.ValueOf())
return true
}
if , := .(interface{ (interface{}) bool }); && .() {
return true
}
= Unwrap()
}
return false
}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |