Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
9cf82218
Unverified
Commit
9cf82218
authored
Sep 12, 2018
by
k8s-ci-robot
Committed by
GitHub
Sep 12, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #68442 from CaoShuFeng/json-patch
vendor: bump github.com/evanphx/json-patch
parents
37ef6eeb
2e974f30
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
21 additions
and
20 deletions
+21
-20
Godeps.json
Godeps/Godeps.json
+2
-2
Godeps.json
...ing/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/apimachinery/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/apiserver/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/cli-runtime/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/sample-cli-plugin/Godeps/Godeps.json
+1
-1
README.md
vendor/github.com/evanphx/json-patch/README.md
+1
-1
patch.go
vendor/github.com/evanphx/json-patch/patch.go
+11
-10
No files found.
Godeps/Godeps.json
View file @
9cf82218
...
@@ -1542,8 +1542,8 @@
...
@@ -1542,8 +1542,8 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Comment"
:
"v3.0.0-
29-gf195058
"
,
"Comment"
:
"v3.0.0-
34-g36442db
"
,
"Rev"
:
"
f195058310bd062ea7c754a834f0ff43b4b63afb
"
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
},
},
{
{
"ImportPath"
:
"github.com/exponent-io/jsonpath"
,
"ImportPath"
:
"github.com/exponent-io/jsonpath"
,
...
...
staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json
View file @
9cf82218
...
@@ -388,7 +388,7 @@
...
@@ -388,7 +388,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
f195058310bd062ea7c754a834f0ff43b4b63afb
"
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
},
},
{
{
"ImportPath"
:
"github.com/ghodss/yaml"
,
"ImportPath"
:
"github.com/ghodss/yaml"
,
...
...
staging/src/k8s.io/apimachinery/Godeps/Godeps.json
View file @
9cf82218
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
f195058310bd062ea7c754a834f0ff43b4b63afb
"
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
},
},
{
{
"ImportPath"
:
"github.com/ghodss/yaml"
,
"ImportPath"
:
"github.com/ghodss/yaml"
,
...
...
staging/src/k8s.io/apiserver/Godeps/Godeps.json
View file @
9cf82218
...
@@ -388,7 +388,7 @@
...
@@ -388,7 +388,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
f195058310bd062ea7c754a834f0ff43b4b63afb
"
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
},
},
{
{
"ImportPath"
:
"github.com/ghodss/yaml"
,
"ImportPath"
:
"github.com/ghodss/yaml"
,
...
...
staging/src/k8s.io/cli-runtime/Godeps/Godeps.json
View file @
9cf82218
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
f195058310bd062ea7c754a834f0ff43b4b63afb
"
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
},
},
{
{
"ImportPath"
:
"github.com/ghodss/yaml"
,
"ImportPath"
:
"github.com/ghodss/yaml"
,
...
...
staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json
View file @
9cf82218
...
@@ -128,7 +128,7 @@
...
@@ -128,7 +128,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
f195058310bd062ea7c754a834f0ff43b4b63afb
"
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
},
},
{
{
"ImportPath"
:
"github.com/ghodss/yaml"
,
"ImportPath"
:
"github.com/ghodss/yaml"
,
...
...
staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json
View file @
9cf82218
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
f195058310bd062ea7c754a834f0ff43b4b63afb
"
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
},
},
{
{
"ImportPath"
:
"github.com/ghodss/yaml"
,
"ImportPath"
:
"github.com/ghodss/yaml"
,
...
...
staging/src/k8s.io/sample-cli-plugin/Godeps/Godeps.json
View file @
9cf82218
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
"Deps"
:
[
"Deps"
:
[
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
f195058310bd062ea7c754a834f0ff43b4b63afb
"
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
},
},
{
{
"ImportPath"
:
"github.com/ghodss/yaml"
,
"ImportPath"
:
"github.com/ghodss/yaml"
,
...
...
vendor/github.com/evanphx/json-patch/README.md
View file @
9cf82218
...
@@ -15,7 +15,7 @@ go get -u github.com/evanphx/json-patch
...
@@ -15,7 +15,7 @@ go get -u github.com/evanphx/json-patch
```
```
**Stable Versions**
:
**Stable Versions**
:
*
Version
3:
`go get -u gopkg.in/evanphx/json-patch.v3
`
*
Version
4:
`go get -u gopkg.in/evanphx/json-patch.v4
`
(previous versions below
`v3`
are unavailable)
(previous versions below
`v3`
are unavailable)
...
...
vendor/github.com/evanphx/json-patch/patch.go
View file @
9cf82218
...
@@ -236,7 +236,7 @@ func (o operation) path() string {
...
@@ -236,7 +236,7 @@ func (o operation) path() string {
}
}
func
(
o
operation
)
from
()
string
{
func
(
o
operation
)
from
()
string
{
if
obj
,
ok
:=
o
[
"from"
];
ok
&&
obj
!=
nil
{
if
obj
,
ok
:=
o
[
"from"
];
ok
&&
obj
!=
nil
{
var
op
string
var
op
string
err
:=
json
.
Unmarshal
(
*
obj
,
&
op
)
err
:=
json
.
Unmarshal
(
*
obj
,
&
op
)
...
@@ -389,16 +389,12 @@ func (d *partialArray) add(key string, val *lazyNode) error {
...
@@ -389,16 +389,12 @@ func (d *partialArray) add(key string, val *lazyNode) error {
cur
:=
*
d
cur
:=
*
d
if
idx
<
0
{
if
idx
<
-
len
(
ary
)
||
idx
>=
len
(
ary
)
{
idx
*=
-
1
if
idx
>
len
(
ary
)
{
return
fmt
.
Errorf
(
"Unable to access invalid index: %d"
,
idx
)
return
fmt
.
Errorf
(
"Unable to access invalid index: %d"
,
idx
)
}
}
idx
=
len
(
ary
)
-
idx
}
if
idx
<
0
{
if
idx
<
0
||
idx
>=
len
(
ary
)
||
idx
>
len
(
cur
)
{
idx
+=
len
(
ary
)
return
fmt
.
Errorf
(
"Unable to access invalid index: %d"
,
idx
)
}
}
copy
(
ary
[
0
:
idx
],
cur
[
0
:
idx
])
copy
(
ary
[
0
:
idx
],
cur
[
0
:
idx
])
ary
[
idx
]
=
val
ary
[
idx
]
=
val
...
@@ -430,9 +426,12 @@ func (d *partialArray) remove(key string) error {
...
@@ -430,9 +426,12 @@ func (d *partialArray) remove(key string) error {
cur
:=
*
d
cur
:=
*
d
if
idx
>=
len
(
cur
)
{
if
idx
<
-
len
(
cur
)
||
idx
>=
len
(
cur
)
{
return
fmt
.
Errorf
(
"Unable to remove invalid index: %d"
,
idx
)
return
fmt
.
Errorf
(
"Unable to remove invalid index: %d"
,
idx
)
}
}
if
idx
<
0
{
idx
+=
len
(
cur
)
}
ary
:=
make
([]
*
lazyNode
,
len
(
cur
)
-
1
)
ary
:=
make
([]
*
lazyNode
,
len
(
cur
)
-
1
)
...
@@ -535,6 +534,8 @@ func (p Patch) test(doc *container, op operation) error {
...
@@ -535,6 +534,8 @@ func (p Patch) test(doc *container, op operation) error {
return
nil
return
nil
}
}
return
fmt
.
Errorf
(
"Testing value %s failed"
,
path
)
return
fmt
.
Errorf
(
"Testing value %s failed"
,
path
)
}
else
if
op
.
value
()
==
nil
{
return
fmt
.
Errorf
(
"Testing value %s failed"
,
path
)
}
}
if
val
.
equal
(
op
.
value
())
{
if
val
.
equal
(
op
.
value
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment