Skip to content

Commit

Permalink
io: minor improvements to doc comment on WriteString.
Browse files Browse the repository at this point in the history
Change-Id: Iddcd0cfb8f2c2f1c4ad7a94b50a9f65b543862c4
Reviewed-on: https://go-review.googlesource.com/10473
Reviewed-by: Minux Ma <minux@golang.org>
  • Loading branch information
dsymonds committed May 29, 2015
1 parent c2fe4a0 commit 80864cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/io/io.go
Expand Up @@ -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)
Expand Down

0 comments on commit 80864cf

Please sign in to comment.