From 2028dbabb63250e9d140060dcb80946e4af15b6c Mon Sep 17 00:00:00 2001 From: wanyaoqi Date: Fri, 10 Jul 2020 16:17:24 +0800 Subject: [PATCH] vendor update: update jsonutils --- go.mod | 2 +- go.sum | 5 +-- vendor/modules.txt | 2 +- vendor/yunion.io/x/jsonutils/go.mod | 2 +- vendor/yunion.io/x/jsonutils/go.sum | 2 + vendor/yunion.io/x/jsonutils/unmarshal.go | 1 + vendor/yunion.io/x/jsonutils/values.go | 47 +++++++++++++++++++++++ 7 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 vendor/yunion.io/x/jsonutils/values.go diff --git a/go.mod b/go.mod index ffcaab40bc..cf5d2ed6a2 100644 --- a/go.mod +++ b/go.mod @@ -136,7 +136,7 @@ require ( k8s.io/cluster-bootstrap v0.17.3 k8s.io/kubernetes v1.16.0 yunion.io/x/executor v0.0.0-20200227030256-a18417815e74 - yunion.io/x/jsonutils v0.0.0-20200708073651-8fe00d01c40a + yunion.io/x/jsonutils v0.0.0-20200710080709-7ca71cdb9383 yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3 yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7 yunion.io/x/pkg v0.0.0-20200708071451-a663dc94e16b diff --git a/go.sum b/go.sum index 0bff71038d..67c0941c02 100644 --- a/go.sum +++ b/go.sum @@ -1110,8 +1110,8 @@ vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj yunion.io/x/executor v0.0.0-20200227030256-a18417815e74 h1:A15C6VdVRWvmQ9pAJHrUs9yan5qKlYH7uaRxHg1kRbk= yunion.io/x/executor v0.0.0-20200227030256-a18417815e74/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws= yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634= -yunion.io/x/jsonutils v0.0.0-20200708073651-8fe00d01c40a h1:hhqz19Rto658JUSp5FGjOfTsepKVT8Rdt/zsFiRVM2Q= -yunion.io/x/jsonutils v0.0.0-20200708073651-8fe00d01c40a/go.mod h1:T7kxQJR13+t7z0TuT+Wzd7MTxBOk2H9c0pO1ONQSv90= +yunion.io/x/jsonutils v0.0.0-20200710080709-7ca71cdb9383 h1:XEhTD+FGjBjEIWwcY0Ez1lY3oTTzjUOcRgH/i4eFM5A= +yunion.io/x/jsonutils v0.0.0-20200710080709-7ca71cdb9383/go.mod h1:3U5hspYn9apQHaXKY+fJ4Qgwjey32Kc+Mq+mUe9NamQ= yunion.io/x/log v0.0.0-20190514041436-04ce53b17c6b/go.mod h1:+gauLs73omeJAPlsXcevLsJLKixV+sR/E7WSYTSx1fE= yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d h1:59zrDL7Ft+hDukguJRmLr/Gdu/9V75x+yX99ovZwfaA= yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U= @@ -1121,7 +1121,6 @@ yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7 h1:gjqNa2uQzIEXyySsbvVz0Ult yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7/go.mod h1:0vLkNEhlmA64HViPBAnSTUMrx5QP1CLsxXmxDKQ80tc= yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E= yunion.io/x/pkg v0.0.0-20190628082551-f4033ba2ea30/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E= -yunion.io/x/pkg v0.0.0-20200302034534-fdf44d54b070/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E= yunion.io/x/pkg v0.0.0-20200708071451-a663dc94e16b h1:wwPzH8iMRYjtaSM2pBN7nOqeZxR4XW5wdz2VE1KH/Ug= yunion.io/x/pkg v0.0.0-20200708071451-a663dc94e16b/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E= yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8J50Cise/HCylsOJngmo= diff --git a/vendor/modules.txt b/vendor/modules.txt index 62a2c084ae..5959dfad9a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1039,7 +1039,7 @@ sigs.k8s.io/yaml yunion.io/x/executor/apis yunion.io/x/executor/client yunion.io/x/executor/server -# yunion.io/x/jsonutils v0.0.0-20200708073651-8fe00d01c40a +# yunion.io/x/jsonutils v0.0.0-20200710080709-7ca71cdb9383 yunion.io/x/jsonutils # yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3 yunion.io/x/log diff --git a/vendor/yunion.io/x/jsonutils/go.mod b/vendor/yunion.io/x/jsonutils/go.mod index a521db2cb8..9eec8d311d 100644 --- a/vendor/yunion.io/x/jsonutils/go.mod +++ b/vendor/yunion.io/x/jsonutils/go.mod @@ -11,5 +11,5 @@ require ( golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 // indirect gopkg.in/yaml.v2 v2.2.2 // indirect yunion.io/x/log v0.0.0-20190514041436-04ce53b17c6b - yunion.io/x/pkg v0.0.0-20200302034534-fdf44d54b070 + yunion.io/x/pkg v0.0.0-20200708071451-a663dc94e16b ) diff --git a/vendor/yunion.io/x/jsonutils/go.sum b/vendor/yunion.io/x/jsonutils/go.sum index f965efca1e..c3e7f47bbb 100644 --- a/vendor/yunion.io/x/jsonutils/go.sum +++ b/vendor/yunion.io/x/jsonutils/go.sum @@ -37,3 +37,5 @@ yunion.io/x/log v0.0.0-20190514041436-04ce53b17c6b h1:Z9z+7iegu0HXuL+S8taVWRd1P4 yunion.io/x/log v0.0.0-20190514041436-04ce53b17c6b/go.mod h1:+gauLs73omeJAPlsXcevLsJLKixV+sR/E7WSYTSx1fE= yunion.io/x/pkg v0.0.0-20200302034534-fdf44d54b070 h1:rKnYgtvMHKmzPEUTkyNjyKOG7wzjpUvI7fcZwLNGQXw= yunion.io/x/pkg v0.0.0-20200302034534-fdf44d54b070/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E= +yunion.io/x/pkg v0.0.0-20200708071451-a663dc94e16b h1:wwPzH8iMRYjtaSM2pBN7nOqeZxR4XW5wdz2VE1KH/Ug= +yunion.io/x/pkg v0.0.0-20200708071451-a663dc94e16b/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E= diff --git a/vendor/yunion.io/x/jsonutils/unmarshal.go b/vendor/yunion.io/x/jsonutils/unmarshal.go index 3d2f743d08..f67187bd98 100644 --- a/vendor/yunion.io/x/jsonutils/unmarshal.go +++ b/vendor/yunion.io/x/jsonutils/unmarshal.go @@ -450,6 +450,7 @@ func (this *JSONDict) unmarshalValue(val reflect.Value) error { case JSONDictType: dict := val.Interface().(JSONDict) dict.Update(this) + val.Set(reflect.ValueOf(dict)) return nil case JSONDictPtrType, JSONObjectType: val.Set(reflect.ValueOf(this)) diff --git a/vendor/yunion.io/x/jsonutils/values.go b/vendor/yunion.io/x/jsonutils/values.go new file mode 100644 index 0000000000..193dc60cfc --- /dev/null +++ b/vendor/yunion.io/x/jsonutils/values.go @@ -0,0 +1,47 @@ +// Copyright 2019 Yunion +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package jsonutils + +// Deprecated +func (this *JSONString) Value() string { + return this.data +} + +// Deprecated +func (this *JSONInt) Value() int64 { + return this.data +} + +// Deprecated +func (this *JSONFloat) Value() float64 { + return this.data +} + +// Deprecated +func (this *JSONBool) Value() bool { + return this.data +} + +// Deprecated +func (this *JSONDict) Value() map[string]JSONObject { + mapJson, _ := this.GetMap() + return mapJson +} + +// Deprecated +func (this *JSONArray) Value() []JSONObject { + arrJson, _ := this.GetArray() + return arrJson +}