mirror of
https://github.com/pushbits/server.git
synced 2025-04-30 10:46:55 +02:00
12 lines
170 B
Go
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"))
|
|
}
|
|
}
|