diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2017-06-28 23:12:41 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2017-06-29 03:29:11 +0000 |
| commit | f081266e4af4bdce22756aa58489225dfbe6bb23 (patch) | |
| tree | 71d4c0f67e39c0649e790bdcd0933247feb6b12c /src/encoding/binary/binary.go | |
| parent | 070b82e2e8b28b067e08927228ee651dd54a4236 (diff) | |
| download | go-f081266e4af4bdce22756aa58489225dfbe6bb23.tar.xz | |
encoding/binary: clarify the repercussions for not following the docs
Fixes #19794
Change-Id: I462cbc432fe9d4a9e6e79a9833b0013d82a0780e
Reviewed-on: https://go-review.googlesource.com/47093
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/encoding/binary/binary.go')
| -rw-r--r-- | src/encoding/binary/binary.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/encoding/binary/binary.go b/src/encoding/binary/binary.go index 3834254596..2d01a3cb28 100644 --- a/src/encoding/binary/binary.go +++ b/src/encoding/binary/binary.go @@ -152,7 +152,8 @@ func (bigEndian) GoString() string { return "binary.BigEndian" } // When reading into structs, the field data for fields with // blank (_) field names is skipped; i.e., blank field names // may be used for padding. -// When reading into a struct, all non-blank fields must be exported. +// When reading into a struct, all non-blank fields must be exported +// or Read may panic. // // The error is EOF only if no bytes were read. // If an EOF happens after reading some but not all the bytes, |
