1
0
Fork 0
mirror of https://github.com/pushbits/server.git synced 2025-10-28 05:07:58 +01:00
pushbits/assert/assert.go
2020-08-02 02:46:38 +02:00

12 lines
170 B
Go

package assert
import (
"errors"
)
// Assert panics if condition is false.
func Assert(condition bool) {
if !condition {
panic(errors.New("assertion failed"))
}
}