mirror of
https://github.com/bloeys/nmage.git
synced 2025-12-29 05:18:21 +00:00
16 lines
256 B
Go
Executable File
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...))
|
|
}
|
|
}
|