]> Cypherpunks repositories - gostls13.git/commit
fmt: correct documentation for Formatter
authorPaul Jolly <paul@myitcv.io>
Wed, 24 May 2023 04:51:09 +0000 (05:51 +0100)
committerPaul Jolly <paul@myitcv.org.uk>
Wed, 24 May 2023 18:58:06 +0000 (18:58 +0000)
commit2a8969cb365a5539b8652d5ac1588aaef78d3e16
tree406548cfa049b73c4eeeedf0257bc66a5c1e9d1d
parent5de20f0f34a7bf08bec8af82befc24e3c0ea5d7e
fmt: correct documentation for Formatter

Before this CL, the documentation for Formatter suggested that
implementers of Format(f State, verb rune) could use Fprint(f) or
Sprint(f) to generate output. The Sprint(f) suggestion however is
invalid.

Fix that by simply suggesting Sprint() alongside Fprint(f).

Fixes #60358

Change-Id: I024e996f6360b812968ef2cd5073cb4c223459e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/497379
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Paul Jolly <paul@myitcv.org.uk>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/fmt/print.go