go/src/fmt
Paul Jolly 2a8969cb36 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>
2023-05-24 18:58:06 +00:00
..
doc.go all: gofmt main repo 2022-04-11 16:34:30 +00:00
errors.go errors, fmt: add support for wrapping multiple errors 2022-09-29 18:40:40 +00:00
errors_test.go errors, fmt: add support for wrapping multiple errors 2022-09-29 18:40:40 +00:00
example_test.go
export_test.go
fmt_test.go all: make safe for new vet analyzer 2023-05-08 20:18:40 +00:00
format.go fmt: rely on utf8.AppendRune 2022-09-21 13:54:31 +00:00
gostringer_example_test.go
print.go fmt: correct documentation for Formatter 2023-05-24 18:58:06 +00:00
scan.go src: rename unexported errors by adding prefix err 2023-02-16 23:09:19 +00:00
scan_test.go fmt,math/big,net/url: fixes to old Benchmarks 2023-05-23 20:25:13 +00:00
state_test.go fmt: add a function to recover the original format string given a State 2022-08-06 09:19:31 +00:00
stringer_example_test.go
stringer_test.go