aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorSantiago M. Mola <santi@mola.io>2017-03-03 16:12:26 +0100
committerGitHub <noreply@github.com>2017-03-03 16:12:26 +0100
commit047a795df6d5a0d5dd0782297cea918e4a4a6e10 (patch)
tree21cb0eead9f6251558e317495418dcbd09614e2a /utils
parent59335b69777f2ef311e63b7d3464459a3ac51d48 (diff)
parent5bf511770f27a14def9d59c375b82c51ab34ba25 (diff)
downloadgo-git-047a795df6d5a0d5dd0782297cea918e4a4a6e10.tar.gz
Merge pull request #299 from ajnavarro/fix/read-all
Return values of Read not checked (fix #65)
Diffstat (limited to 'utils')
-rw-r--r--utils/binary/read.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/binary/read.go b/utils/binary/read.go
index 608583b..7cd6184 100644
--- a/utils/binary/read.go
+++ b/utils/binary/read.go
@@ -27,7 +27,7 @@ func ReadUntil(r io.Reader, delim byte) ([]byte, error) {
var buf [1]byte
value := make([]byte, 0, 16)
for {
- if _, err := r.Read(buf[:]); err != nil {
+ if _, err := io.ReadFull(r, buf[:]); err != nil {
if err == io.EOF {
return nil, err
}