upgrade gopkg.in/evanphx/json-patch to v4.11.0

Signed-off-by: pacoxu <paco.xu@daocloud.io>
This commit is contained in:
pacoxu
2021-06-04 13:15:09 +08:00
parent a9725892b7
commit 6e0650e3e1
36 changed files with 93 additions and 87 deletions

View File

@@ -721,6 +721,10 @@ func (p Patch) Apply(doc []byte) ([]byte, error) {
// ApplyIndent mutates a JSON document according to the patch, and returns the new
// document indented.
func (p Patch) ApplyIndent(doc []byte, indent string) ([]byte, error) {
if len(doc) == 0 {
return doc, nil
}
var pd container
if doc[0] == '[' {
pd = &partialArray{}