1
0
mirror of https://github.com/golang/go synced 2024-11-12 10:00:25 -07:00

io/ioutil: add WriteString to Discard

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/12580045
This commit is contained in:
Brad Fitzpatrick 2013-08-09 11:27:29 -07:00
parent cc0a005c9d
commit ecf3274143

View File

@ -132,6 +132,10 @@ func (devNull) Write(p []byte) (int, error) {
return len(p), nil
}
func (devNull) WriteString(s string) (int, error) {
return len(s), nil
}
func (devNull) ReadFrom(r io.Reader) (n int64, err error) {
buf := blackHole()
defer blackHolePut(buf)