Source File
wrap.go
Belonging Package
errors
package errors
import (
)
func (, error) bool {
if == nil {
return ==
}
:= reflectlite.TypeOf().Comparable()
for {
if && == {
return true
}
if , := .(interface{ (error) bool }); && .() {
return true
func ( error, interface{}) bool {
if == nil {
panic("errors: target cannot be nil")
}
:= reflectlite.ValueOf()
:= .Type()
if .Kind() != reflectlite.Ptr || .IsNil() {
panic("errors: target must be a non-nil pointer")
}
if := .Elem(); .Kind() != reflectlite.Interface && !.Implements(errorType) {
panic("errors: *target must be interface or implement error")
}
:= .Elem()
for != nil {
if reflectlite.TypeOf().AssignableTo() {
.Elem().Set(reflectlite.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. |