summaryrefslogtreecommitdiff
path: root/vendor/codeberg.org/gruf/go-debug/debug.go
blob: 61e4eda41145658e9e55a4f843333a6e4ab6d692 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package debug

// DEBUG returns whether debugging is enabled.
func DEBUG() bool {
	return debug
}

// Run will only call fn if DEBUG is enabled.
func Run(fn func()) {
	if debug {
		fn()
	}
}