]> Cypherpunks repositories - gostls13.git/commitdiff
fmt: fix incorrect doc comment
authorwanggang <wg971211@gmail.com>
Sat, 21 Sep 2024 03:02:47 +0000 (03:02 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 23 Sep 2024 18:01:36 +0000 (18:01 +0000)
I noticed that the comment incorrectly stated 'WriteString implemented WriteString', it should be 'implemented io.StringWriter' instead.

Change-Id: I844a8c805e5f0c32b5aea68c4bba6982f6fcc8a7
GitHub-Last-Rev: a0d93b6e9d3c2a508d1f3c0ce23e98274ec421fb
GitHub-Pull-Request: golang/go#69546
Reviewed-on: https://go-review.googlesource.com/c/go/+/614575
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Rob Pike <r@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
src/fmt/print.go

index f9f200499dc3383fe36aa81e5a8541fcbea9127a..155218046f47ce9d5f5cd36da2aaa4753b4f0324 100644 (file)
@@ -201,14 +201,14 @@ func (p *pp) Flag(b int) bool {
        return false
 }
 
-// Implement Write so we can call [Fprintf] on a pp (through [State]), for
+// Write implements [io.Writer] so we can call [Fprintf] on a pp (through [State]), for
 // recursive use in custom verbs.
 func (p *pp) Write(b []byte) (ret int, err error) {
        p.buf.write(b)
        return len(b), nil
 }
 
-// Implement WriteString so that we can call [io.WriteString]
+// WriteString implements [io.StringWriter] so that we can call [io.WriteString]
 // on a pp (through state), for efficiency.
 func (p *pp) WriteString(s string) (ret int, err error) {
        p.buf.writeString(s)