1
0
Fork 0
mirror of https://github.com/pushbits/server.git synced 2025-05-24 06:16:37 +02:00
pushbits/internal/assert/assert.go
2021-01-16 16:56:49 +01: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"))
}
}