dsfx/internal/lib/assert/assert.go

11 lines
212 B
Go

package assert
import "fmt"
// Assert panics if the given truth value is false, with the given message.
func Assert(truth bool, msg string) {
if !truth {
panic(fmt.Sprintf("Assertion Failed: %s", msg))
}
}