1 Star 0 Fork 0

micro-tools/wf

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
utils_debug.go 844 Bytes
一键复制 编辑 原始数据 按行查看 历史
545403892 提交于 2023-09-27 22:16 +08:00 . 升级go-ole
package utils
import (
"gitee.com/micro-tools/wf/internal/command"
)
const (
debugKey = "wf.debug" // Debug key for checking if in debug mode.
StackFilterKeyForGoFrame = "/gitee.com/micro-tools/wf/" // Stack filtering key for all GoFrame module paths.
)
var (
// isDebugEnabled marks whether GoFrame debug mode is enabled.
isDebugEnabled = false
)
func init() {
// Debugging configured.
value := command.GetOptWithEnv(debugKey)
if value == "" || value == "0" || value == "false" {
isDebugEnabled = false
} else {
isDebugEnabled = true
}
}
// IsDebugEnabled checks and returns whether debug mode is enabled.
// The debug mode is enabled when command argument "wf.debug" or environment "GF_DEBUG" is passed.
func IsDebugEnabled() bool {
return isDebugEnabled
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/micro-tools/wf.git
git@gitee.com:micro-tools/wf.git
micro-tools
wf
wf
v1.0.2

搜索帮助