/go-must

simple go assertion package

Primary LanguageGoMIT LicenseMIT

go-must

simple go assertion package

By v-braun - viktor-braun.de.

Build Status codecov PR welcome

Installation

go get github.com/v-braun/go-must

Usage

// 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)

Authors

image
v-braun

Contributing

Make sure to read these guides before getting started:

License

go-must is available under the MIT License. See LICENSE for details.