]> Cypherpunks repositories - gostls13.git/commit
bytes: panic in ReadFrom with more information with negative Read counts
authorAfanasev Stanislav <phpprogger@gmail.com>
Tue, 3 Oct 2017 19:40:28 +0000 (22:40 +0300)
committerJoe Tsai <thebrokentoaster@gmail.com>
Fri, 6 Oct 2017 06:49:40 +0000 (06:49 +0000)
commit07e36af7d6a34d2d70fa794dda44ad2b087c21e1
tree3e312e26fcaa456bd16069483cd8897650853e6d
parent9005b220e495ee260230ccf00e54e85abd6df808
bytes: panic in ReadFrom with more information with negative Read counts

This is only to aid in human debugging, and for that reason we maintain a panic, and not return an error.

Fixes #22097

Change-Id: If72e4d1e47ec9125ca7bc97d5fe4cedb7f76ae72
Reviewed-on: https://go-review.googlesource.com/67970
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/bytes/buffer.go
src/bytes/buffer_test.go