Hacker News new | ask | show | jobs
by cube2222 2868 days 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
  }
1 comments

oooh!