修复格式问题,重构嵌套层数过深的函数

This commit is contained in:
Leonard Wang
2020-05-19 23:46:07 +08:00
parent 5e2687a742
commit b09e54c205
38 changed files with 168 additions and 173 deletions
+2 -2
View File
@@ -117,7 +117,7 @@ func Casbin() *casbin.Enforcer {
func ParamsMatch(fullNameKey1 string, key2 string) bool {
key1 := strings.Split(fullNameKey1, "?")[0]
//剥离路径后再使用casbin的keyMatch2
// 剥离路径后再使用casbin的keyMatch2
return util.KeyMatch2(key1, key2)
}
@@ -132,5 +132,5 @@ func ParamsMatchFunc(args ...interface{}) (interface{}, error) {
name1 := args[0].(string)
name2 := args[1].(string)
return (bool)(ParamsMatch(name1, name2)), nil
return ParamsMatch(name1, name2), nil
}