]> Cypherpunks repositories - gostls13.git/commitdiff
io: add ByteWriter interface
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 30 Oct 2012 09:51:29 +0000 (10:51 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 30 Oct 2012 09:51:29 +0000 (10:51 +0100)
API change.

R=golang-dev, dsymonds, nigeltao, rsc, r
CC=golang-dev
https://golang.org/cl/6760045

src/pkg/io/io.go

index 5187eff70a9c5d36480f734c3336e767b4dc71be..bddb701786bb41bed7068d612763b062d1af3925 100644 (file)
@@ -216,6 +216,11 @@ type ByteScanner interface {
        UnreadByte() error
 }
 
+// ByteWriter is the interface that wraps the WriteByte method.
+type ByteWriter interface {
+       WriteByte(c byte) error
+}
+
 // RuneReader is the interface that wraps the ReadRune method.
 //
 // ReadRune reads a single UTF-8 encoded Unicode character