qbtrade/pkg/exchange/bitget/debug.go
2024-06-27 22:42:38 +08:00

20 lines
363 B
Go

package bitget
import "git.qtrade.icu/lychiyu/qbtrade/pkg/util"
type LogFunction func(msg string, args ...interface{})
var debugf LogFunction
func getDebugFunction() LogFunction {
if v, ok := util.GetEnvVarBool("DEBUG_BITGET"); ok && v {
return log.Infof
}
return func(msg string, args ...interface{}) {}
}
func init() {
debugf = getDebugFunction()
}