mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 02:37:24 +08:00
update vendor
This commit is contained in:
Generated
+2
-2
@@ -1727,11 +1727,11 @@
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:d3c072ad0d07c2fd34aa7b302b034dbfaf02a111153f9f454c22b5cbc4e0c112"
|
||||
digest = "1:4a5650188ffb8bdd996d206a0523e04da195b1a3fccee2d5baf49f2066a90c45"
|
||||
name = "yunion.io/x/jsonutils"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "5ced58e220e149b07afbd1c6f2824f028da609a9"
|
||||
revision = "95ffaa8b26b47a79bce22705655ab6d9586b891d"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
||||
+3
@@ -117,6 +117,9 @@ func (this *JSONDict) QueryString() string {
|
||||
}
|
||||
|
||||
func QueryBoolean(query JSONObject, key string, defVal bool) bool {
|
||||
if query == nil {
|
||||
return defVal
|
||||
}
|
||||
jsonVal, _ := query.Get(key)
|
||||
if jsonVal != nil {
|
||||
str, _ := jsonVal.GetString()
|
||||
|
||||
+10
@@ -56,6 +56,9 @@ func NewTimeString(tm time.Time) *JSONString {
|
||||
}
|
||||
|
||||
func GetQueryStringArray(query JSONObject, key string) []string {
|
||||
if query == nil {
|
||||
return nil
|
||||
}
|
||||
var arr []string
|
||||
searchObj, _ := query.Get(key)
|
||||
if searchObj != nil {
|
||||
@@ -101,6 +104,9 @@ func CheckRequiredFields(data JSONObject, fields []string) error {
|
||||
}
|
||||
|
||||
func GetAnyString(json JSONObject, keys []string) string {
|
||||
if json == nil {
|
||||
return ""
|
||||
}
|
||||
for _, key := range keys {
|
||||
val, _ := json.GetString(key)
|
||||
if len(val) > 0 {
|
||||
@@ -111,6 +117,10 @@ func GetAnyString(json JSONObject, keys []string) string {
|
||||
}
|
||||
|
||||
func GetArrayOfPrefix(json JSONObject, prefix string) []JSONObject {
|
||||
if json == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
retArray := make([]JSONObject, 0)
|
||||
idx := 0
|
||||
for {
|
||||
|
||||
Reference in New Issue
Block a user