mirror of
https://github.com/bloeys/nterm.git
synced 2025-12-29 06:28:20 +00:00
Bism Allah
This commit is contained in:
11
assert/assert.go
Executable file
11
assert/assert.go
Executable file
@ -0,0 +1,11 @@
|
||||
package assert
|
||||
|
||||
import (
|
||||
"github.com/bloeys/nterm/consts"
|
||||
)
|
||||
|
||||
func T(check bool, msg string) {
|
||||
if consts.Mode_Debug && !check {
|
||||
panic("Assert failed: " + msg)
|
||||
}
|
||||
}
|
||||
7
consts/consts_debug.go
Executable file
7
consts/consts_debug.go
Executable file
@ -0,0 +1,7 @@
|
||||
//go:build !release
|
||||
|
||||
package consts
|
||||
|
||||
const (
|
||||
Mode_Debug = true
|
||||
)
|
||||
7
consts/consts_release.go
Executable file
7
consts/consts_release.go
Executable file
@ -0,0 +1,7 @@
|
||||
//go:build release
|
||||
|
||||
package consts
|
||||
|
||||
const (
|
||||
Mode_Debug = false
|
||||
)
|
||||
Reference in New Issue
Block a user