util: Add errwrap package

Simplify working with errors across our code base. Instead of constantly
importing the necessary error helpers, assemble them all into one
package and import and use that as needed.
This commit is contained in:
James Shubin
2019-03-12 15:27:40 -04:00
parent da1c96c6fd
commit 6044ade373
3 changed files with 101 additions and 0 deletions

View File

@@ -50,6 +50,10 @@ function naked-error() {
}
function consistent-imports() {
if [ "$1" = './util/errwrap/errwrap.go' ]; then
return 0
fi
if grep $'\t"github.com/pkg/errors"' "$1"; then # import as errwrap
return 1
fi