mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 05:12:32 +08:00
用户操作权限增加角色权限过滤,优化角色/部门关系树生成,修复验证码空参数不验证问题
This commit is contained in:
@@ -5,15 +5,4 @@
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package global
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
)
|
||||
|
||||
var (
|
||||
// RootPtah 运行根路径
|
||||
RootPtah string
|
||||
// SysType 操作系统类型 windows | linux
|
||||
SysType = runtime.GOOS
|
||||
// JaegerSwitch 链路追踪开关
|
||||
JaegerSwitch bool
|
||||
)
|
||||
// 在这里可以配置一些全局公用的变量
|
||||
|
@@ -24,6 +24,7 @@ import (
|
||||
"hotgo/internal/service"
|
||||
"hotgo/utility/charset"
|
||||
"hotgo/utility/simple"
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -37,8 +38,7 @@ func Init(ctx context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
RootPtah = gfile.Pwd()
|
||||
fmt.Printf("欢迎使用HotGo!\r\n当前运行环境:%v, 运行根路径为:%v \r\nHotGo版本:v%v, gf版本:%v \n", SysType, RootPtah, consts.VersionApp, gf.VERSION)
|
||||
fmt.Printf("欢迎使用HotGo!\r\n当前运行环境:%v, 运行根路径为:%v \r\nHotGo版本:v%v, gf版本:%v \n", runtime.GOOS, gfile.Pwd(), consts.VersionApp, gf.VERSION)
|
||||
|
||||
// 初始化链路追踪
|
||||
InitTrace(ctx)
|
||||
@@ -121,8 +121,7 @@ func LoggingServeLogHandler(ctx context.Context, in *glog.HandlerInput) {
|
||||
|
||||
// InitTrace 初始化链路追踪
|
||||
func InitTrace(ctx context.Context) {
|
||||
JaegerSwitch = g.Cfg().MustGet(ctx, "jaeger.switch").Bool()
|
||||
if !JaegerSwitch {
|
||||
if !g.Cfg().MustGet(ctx, "jaeger.switch").Bool() {
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user