mirror of
https://github.com/bloeys/nterm.git
synced 2025-12-29 14:38:19 +00:00
14 lines
210 B
Go
Executable File
14 lines
210 B
Go
Executable File
package assert
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/bloeys/nterm/consts"
|
|
)
|
|
|
|
func T(check bool, msg string, args ...any) {
|
|
if consts.Mode_Debug && !check {
|
|
panic("Assert failed: " + fmt.Sprintf(msg, args...))
|
|
}
|
|
}
|