Created
August 23, 2018 23:07
-
-
Save xealgo/a63d114fcfee701868254b2c4f3f3476 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var DbConnectionFailure = errors.New("Failed to run query because a database connection was not established"); | |
... | |
return errors.Wrap(DbConnectionFailure, err.Error()) | |
... | |
if errors.Cause(err) == DbConnectionFailure { | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment