From 6f0a0ebbe8661f24797124803a4114eef08e6db9 Mon Sep 17 00:00:00 2001 From: Fabian <-> Date: Fri, 6 Mar 2020 18:34:41 +0100 Subject: [PATCH 1/2] return from decoding function at eof instead of break from the decoding loop --- reqest.go | 2 +- response.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reqest.go b/reqest.go index 8223e5b..f6d8db3 100644 --- a/reqest.go +++ b/reqest.go @@ -147,7 +147,7 @@ func (d *RequestDecoder) Decode(data io.Writer) (*Request, error) { // when we read from a stream, we may get an EOF if we want to read the end tag // all data should be read and we can ignore the error if err == io.EOF { - break + return req, nil } return nil, err } diff --git a/response.go b/response.go index 7ff3e7b..94a2230 100644 --- a/response.go +++ b/response.go @@ -223,7 +223,7 @@ func (d *ResponseDecoder) Decode(data io.Writer) (*Response, error) { // when we read from a stream, we may get an EOF if we want to read the end tag // all data should be read and we can ignore the error if err == io.EOF { - break + return resp, nil } return nil, err } From 5344d4c21b99303e1c6d944f0587fb025c3da89b Mon Sep 17 00:00:00 2001 From: Fabian <46140201+phin1x@users.noreply.github.com> Date: Fri, 6 Mar 2020 20:18:26 +0100 Subject: [PATCH 2/2] Updated version in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2107077..037a720 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # go-ipp -[![Version](https://img.shields.io/github/release-pre/phin1x/go-ipp.svg)](https://github.com/phin1x/go-ipp/releases/tag/v1.1.0) +[![Version](https://img.shields.io/github/release-pre/phin1x/go-ipp.svg)](https://github.com/phin1x/go-ipp/releases/tag/v1.3.0) [![Licence](https://img.shields.io/github/license/phin1x/go-ipp.svg)](https://github.com/phin1x/go-ipp/blob/master/LICENSE)