From 7139b676cfccf1c204fade01e865163f9765be55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=87=E6=B7=BC=EF=BC=88piexlmax?= <303176530@qq.com> Date: Thu, 20 May 2021 10:13:33 +0800 Subject: [PATCH 1/2] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9e2d7c15..32213fc0 100644 --- a/README.md +++ b/README.md @@ -223,12 +223,12 @@ zap: #### 2.3.1 安装 swagger -##### (1)可以科学上网 +##### (1)可以访问外国网站 ```` go get -u github.com/swaggo/swag/cmd/swag ```` -##### (2)无法科学上网 +##### (2)无法访问外国网站 由于国内没法安装 go.org/x 包下面的东西,推荐使用 [goproxy.io](https://goproxy.io/zh/) From 86cfebb064f18c3a8e2f105594c46940cb4387c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=87=E6=B7=BC=EF=BC=88piexlmax?= Date: Thu, 20 May 2021 11:05:44 +0800 Subject: [PATCH 2/2] Revert "Gva gormv2 dev" --- server/service/sys_casbin.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/server/service/sys_casbin.go b/server/service/sys_casbin.go index 556dd086..6e72c5ff 100644 --- a/server/service/sys_casbin.go +++ b/server/service/sys_casbin.go @@ -91,9 +91,8 @@ func ClearCasbin(v int, p ...string) bool { //@return: *casbin.Enforcer var ( - e *casbin.Enforcer - once sync.Once - eLock sync.Mutex + e *casbin.Enforcer + once sync.Once ) func Casbin() *casbin.Enforcer { @@ -102,9 +101,7 @@ func Casbin() *casbin.Enforcer { e, _ = casbin.NewEnforcer(global.GVA_CONFIG.Casbin.ModelPath, a) e.AddFunction("ParamsMatch", ParamsMatchFunc) }) - eLock.Lock() _ = e.LoadPolicy() - eLock.Unlock() return e }