gopherhole/internal/utils.go

18 lines
303 B
Go

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
}