mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-10 09:20:25 +08:00
路由规则找不到的时候提示用户
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"reflect"
|
||||
)
|
||||
@@ -22,3 +23,8 @@ func JSONClone(v interface{}) (interface{}, error) {
|
||||
|
||||
return nv, nil
|
||||
}
|
||||
|
||||
// 判断JSON数据是否为null
|
||||
func JSONIsNull(jsonData []byte) bool {
|
||||
return len(jsonData) == 0 || bytes.Equal(jsonData, []byte("null"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user