mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb
full diff: 4e3ac2762d...02993c407b
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
2
vendor/github.com/xeipuuv/gojsonpointer/README.md
generated
vendored
2
vendor/github.com/xeipuuv/gojsonpointer/README.md
generated
vendored
@ -35,7 +35,7 @@ An implementation of JSON Pointer - Go language
|
||||
|
||||
|
||||
## References
|
||||
http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07
|
||||
https://tools.ietf.org/html/rfc6901
|
||||
|
||||
### Note
|
||||
The 4.Evaluation part of the previous reference, starting with 'If the currently referenced value is a JSON array, the reference token MUST contain either...' is not implemented.
|
||||
|
8
vendor/github.com/xeipuuv/gojsonpointer/pointer.go
generated
vendored
8
vendor/github.com/xeipuuv/gojsonpointer/pointer.go
generated
vendored
@ -130,10 +130,10 @@ func (p *JsonPointer) implementation(i *implStruct) {
|
||||
node = v[decodedToken]
|
||||
if isLastToken && i.mode == "SET" {
|
||||
v[decodedToken] = i.setInValue
|
||||
} else if isLastToken && i.mode =="DEL" {
|
||||
delete(v,decodedToken)
|
||||
} else if isLastToken && i.mode == "DEL" {
|
||||
delete(v, decodedToken)
|
||||
}
|
||||
} else if (isLastToken && i.mode == "SET") {
|
||||
} else if isLastToken && i.mode == "SET" {
|
||||
v[decodedToken] = i.setInValue
|
||||
} else {
|
||||
i.outError = fmt.Errorf("Object has no key '%s'", decodedToken)
|
||||
@ -160,7 +160,7 @@ func (p *JsonPointer) implementation(i *implStruct) {
|
||||
node = v[tokenIndex]
|
||||
if isLastToken && i.mode == "SET" {
|
||||
v[tokenIndex] = i.setInValue
|
||||
} else if isLastToken && i.mode =="DEL" {
|
||||
} else if isLastToken && i.mode == "DEL" {
|
||||
v[tokenIndex] = v[len(v)-1]
|
||||
v[len(v)-1] = nil
|
||||
v = v[:len(v)-1]
|
||||
|
Reference in New Issue
Block a user