add the missing file

This commit is contained in:
c9s 2024-01-29 15:45:48 +08:00
parent 8d2f4fb626
commit 35b7667da6
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
2 changed files with 25 additions and 0 deletions

16
pkg/strategy/tri/debug.go Normal file
View File

@ -0,0 +1,16 @@
//go:build debug
// +build debug
package tri
const debugMode = true
func debug(msg string, args ...any) {
log.Infof(msg, args...)
}
func debugAssert(expr bool, msg string, args ...any) {
if !expr {
log.Errorf(msg, args...)
}
}

View File

@ -0,0 +1,9 @@
//go:build !debug
package tri
const debugMode = false
func debug(msg string, args ...any) {}
func debugAssert(expr bool, msg string, args ...any) {}