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

io: minor improvements to doc comment on WriteString.

Change-Id: Iddcd0cfb8f2c2f1c4ad7a94b50a9f65b543862c4
Reviewed-on: https://go-review.googlesource.com/10473
Reviewed-by: Minux Ma <minux@golang.org>
This commit is contained in:
David Symonds 2015-05-29 14:29:57 +10:00
parent c2fe4a0ea1
commit 80864cf1f7

View File

@ -273,8 +273,8 @@ type stringWriter interface {
WriteString(s string) (n int, err error)
}
// WriteString writes the contents of the string s to w, which accepts an array of bytes.
// If w already implements a WriteString method, it is invoked directly.
// WriteString writes the contents of the string s to w, which accepts a slice of bytes.
// If w implements a WriteString method, it is invoked directly.
func WriteString(w Writer, s string) (n int, err error) {
if sw, ok := w.(stringWriter); ok {
return sw.WriteString(s)