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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user