fix: add role limit

This commit is contained in:
fallen-angle
2022-04-27 22:08:02 +08:00
parent fc347a4140
commit 22cb5ec61f
19 changed files with 274 additions and 77 deletions

10
utils/json.go Normal file
View File

@@ -0,0 +1,10 @@
package utils
import (
"encoding/json"
)
func Strcut2Map[S any, T *map[string]interface{} | *[]map[string]interface{}](source S, target T) {
jsonByte, _ := json.Marshal(source)
json.Unmarshal(jsonByte, target)
}