diff options
| author | Dan Peterson <dpiddy@gmail.com> | 2016-04-11 21:47:37 -0300 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-04-12 01:03:51 +0000 |
| commit | c9b66bb355ebbc6a26ee511e996cba4da3e1d644 (patch) | |
| tree | f7ac775d6e94d2940c904cd80f4e29a79fce10d7 /src/io | |
| parent | 1f54410a61e2242285e366a5580943f78fbff741 (diff) | |
| download | go-c9b66bb355ebbc6a26ee511e996cba4da3e1d644.tar.xz | |
io: document WriteString calls Write exactly once
Fixes #13849
Change-Id: Idd7f06b547a0179fe15571807a8c48b7c3b78d7c
Reviewed-on: https://go-review.googlesource.com/21852
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/io')
| -rw-r--r-- | src/io/io.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/io/io.go b/src/io/io.go index 023473c79b..c36ec2afbb 100644 --- a/src/io/io.go +++ b/src/io/io.go @@ -291,6 +291,7 @@ type stringWriter interface { // 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. +// Otherwise, w.Write is called exactly once. func WriteString(w Writer, s string) (n int, err error) { if sw, ok := w.(stringWriter); ok { return sw.WriteString(s) |
