simple go assertion package
go get github.com/v-braun/go-must
// if val == nil will panic with "argument val is nil"
must.ArgNotNil(val, "val")
// if val <= 1 will panic with val invalid: (0 > 1) == false
must.ArgBeValid(val > 1, "val invalid: (%d > 1) == false", val)
Make sure to read these guides before getting started:
go-must is available under the MIT License. See LICENSE for details.