mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
encoding/gob: rename encBuffer.WriteByte to writeByte
Renaming the method makes clear, both to readers and to vet, that this method is not the implementation of io.ByteWriter. Working toward making the tree vet-safe instead of having so many exceptions in cmd/vet/all/whitelist. For #31916. Change-Id: I5b509eb7f0118d5f2d3c6e352ff2849cd5a3071e Reviewed-on: https://go-review.googlesource.com/c/go/+/176110 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
50a1d89ab2
commit
c514071988
2 changed files with 2 additions and 6 deletions
|
|
@ -47,7 +47,7 @@ var encBufferPool = sync.Pool{
|
|||
},
|
||||
}
|
||||
|
||||
func (e *encBuffer) WriteByte(c byte) {
|
||||
func (e *encBuffer) writeByte(c byte) {
|
||||
e.data = append(e.data, c)
|
||||
}
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ func (enc *Encoder) freeEncoderState(e *encoderState) {
|
|||
// encodeUint writes an encoded unsigned integer to state.b.
|
||||
func (state *encoderState) encodeUint(x uint64) {
|
||||
if x <= 0x7F {
|
||||
state.b.WriteByte(uint8(x))
|
||||
state.b.writeByte(uint8(x))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue