You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
303 B
18 lines
303 B
package internal
|
|
|
|
import "log"
|
|
|
|
func AssertFail(condition bool, fmtStr string, params ...interface{}) {
|
|
if condition {
|
|
log.Panicf(fmtStr, params...)
|
|
}
|
|
}
|
|
|
|
func Assert(condition bool, fmtStr string, params ...interface{}) bool {
|
|
if condition {
|
|
log.Printf(fmtStr, params...)
|
|
}
|
|
|
|
return condition
|
|
}
|