]> Cypherpunks repositories - gostls13.git/commit
bytes: clean-up of buffer.go
authorMarvin Stenger <marvin.stenger94@gmail.com>
Sun, 7 May 2017 14:23:04 +0000 (16:23 +0200)
committerIan Lance Taylor <iant@golang.org>
Fri, 18 Aug 2017 17:41:11 +0000 (17:41 +0000)
commit1ba4556a2c84f552f7c9697ad7323fd6cdbc6970
treeee2911b5adcb27d7f6ba13ca84f21a93e388b8e2
parent99fe3f8c63c20d675b0237665a535a8ad9783de4
bytes: clean-up of buffer.go

Clean-up changes in no particular order:
- use uint8 instead of int for readOp
- remove duplicated code in ReadFrom()
- introduce (*Buffer).empty()
- remove naked returns

Change-Id: Ie6e673c20c398f980f8be0448969a36ad4778804
Reviewed-on: https://go-review.googlesource.com/42816
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/bytes/buffer.go