Vectrum
Sign In
9 lines · 393 Bytes · Shell
#!/usr/bin/env bash
set -euo pipefail
export GOPROXY=off GOFLAGS=-mod=mod
git checkout HEAD -- conf_test.go
go vet ./... 2>&1
go test ./... 2>&1
grep -qE 'func Load\(path string\) \(Settings, error\)' conf.go || { echo "Load does not return an error"; exit 1; }
grep -q '_ = \|, _ :=\|, _ =' conf.go && { echo "an error is still being discarded in conf.go"; exit 1; }
echo "errors propagated"