Skip to content

Commit

Permalink
add the missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Jan 29, 2024
1 parent 8d2f4fb commit 35b7667
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pkg/strategy/tri/debug.go
Original file line number Diff line number Diff line change
@@ -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...)
}
}
9 changes: 9 additions & 0 deletions pkg/strategy/tri/debug_null.go
Original file line number Diff line number Diff line change
@@ -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) {}

0 comments on commit 35b7667

Please sign in to comment.