3 ms·
No, you don't, DBError should implement the error interface. IsTemporary also takes an error and does something like: if err, ok := errors.Cause(err).(*DBEr
by cube2222 8y ago
No, you don't, DBError should implement the error interface.
IsTemporary also takes an error and does something like:
if err, ok := errors.Cause(err).(*DBError) {
return err.temporary
} else {
return false
}
- macrael 8y agooooh!