]> Cypherpunks repositories - gostls13.git/commit
bytes: make all readOp constants actually typed
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 18 Nov 2017 15:53:53 +0000 (15:53 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sat, 18 Nov 2017 17:07:05 +0000 (17:07 +0000)
commit962834dd143311f764d331417fc208ce2045c61a
tree4f7c3c9099599327254b5d6be4d989ed358e956c
parentaad928957184e0d632ef6f7b83d69d3e3c2e0868
bytes: make all readOp constants actually typed

This is a regression introduced in golang.org/cl/28817. That change got
rid of the iota, which meant that the type was no longer applied to all
the constant names.

Re-add the iota starting at -1, simplifying the code and adding the
types once more.

Change-Id: I38bd0e04f8d298196bccd33651e29f5011401a8d
Reviewed-on: https://go-review.googlesource.com/78617
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/bytes/buffer.go