Files
nmage/assert/assert.go

16 lines
256 B
Go
Executable File

package assert
import (
"fmt"
"github.com/bloeys/nmage/consts"
"github.com/bloeys/nmage/logging"
)
func T(check bool, msg string, args ...any) {
if consts.Debug && !check {
logging.ErrLog.Panicln("Assert failed:", fmt.Sprintf(msg, args...))
}
}