v-braun / go-must

simple go assertion package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

simple go assertion package

License:MIT License


Languages

Language:Go 100.0%