fix: add role limit
This commit is contained in:
10
utils/json.go
Normal file
10
utils/json.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user