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:
parent
cc0a005c9d
commit
ecf3274143
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user