summaryrefslogtreecommitdiff
path: root/vendor/github.com/json-iterator/go/stream.go
diff options
context:
space:
mode:
authorzhangguanzhang <guanzhangzhang@gmail.com>2020-06-12 19:54:10 +0800
committerGitHub <noreply@github.com>2020-06-12 19:54:10 +0800
commit64eae15aa7905dd49f4a348f6b4765dfb4d9dd91 (patch)
tree2914c20a2e0e15383da50334cad89b9b85b209a1 /vendor/github.com/json-iterator/go/stream.go
parent3218736cff4b718b8fe855759687cb66f19d6e1e (diff)
parent8aa5cf3d45998bc92eaafd67ab2a59e3722bade4 (diff)
downloadpodman-64eae15aa7905dd49f4a348f6b4765dfb4d9dd91.tar.gz
podman-64eae15aa7905dd49f4a348f6b4765dfb4d9dd91.tar.bz2
podman-64eae15aa7905dd49f4a348f6b4765dfb4d9dd91.zip
Merge pull request #1 from containers/master
# sync
Diffstat (limited to 'vendor/github.com/json-iterator/go/stream.go')
-rw-r--r--vendor/github.com/json-iterator/go/stream.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/vendor/github.com/json-iterator/go/stream.go b/vendor/github.com/json-iterator/go/stream.go
index 17662fded..23d8a3ad6 100644
--- a/vendor/github.com/json-iterator/go/stream.go
+++ b/vendor/github.com/json-iterator/go/stream.go
@@ -103,14 +103,14 @@ func (stream *Stream) Flush() error {
if stream.Error != nil {
return stream.Error
}
- n, err := stream.out.Write(stream.buf)
+ _, err := stream.out.Write(stream.buf)
if err != nil {
if stream.Error == nil {
stream.Error = err
}
return err
}
- stream.buf = stream.buf[n:]
+ stream.buf = stream.buf[:0]
return nil
}
@@ -177,7 +177,6 @@ func (stream *Stream) WriteEmptyObject() {
func (stream *Stream) WriteMore() {
stream.writeByte(',')
stream.writeIndention(0)
- stream.Flush()
}
// WriteArrayStart write [ with possible indention