1
0
mirror of https://github.com/golang/go synced 2024-11-18 16:44:43 -07:00
go/src/fmt
Martin Möhrmann 99f179f55a fmt: avoid badverb formatting for %q when used with integers
Instead of returning a bad verb error format for runes above
utf8.Maxrune return a quoted utf8.RuneError rune (\ufffd).
This makes the behaviour consistent with the "c" verb and
aligns behaviour to not return bad verb error format when
a verb is applied to the correct argument type.

Fixes #14569

Change-Id: I679485f6bb90ebe408423ab68af16cce38816cd0
Reviewed-on: https://go-review.googlesource.com/c/go/+/248759
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2020-08-17 04:55:28 +00:00
..
doc.go errors, fmt: revert rejected changes for Go 1.13 2019-05-15 19:53:15 +00:00
errors_test.go cmd: update x/tools version to enforce only one %w 2019-09-27 21:17:15 +00:00
errors.go fmt: fix typo in errors.go 2019-06-27 04:16:38 +00:00
example_test.go
export_test.go
fmt_test.go fmt: avoid badverb formatting for %q when used with integers 2020-08-17 04:55:28 +00:00
format.go fmt: do not remove trailing zeros for %g and %G with #(sharp) flag 2020-02-26 08:43:57 +00:00
gostringer_example_test.go
print.go fmt: avoid badverb formatting for %q when used with integers 2020-08-17 04:55:28 +00:00
scan_test.go fmt: fix handling of %% verb in Scanf 2019-10-25 04:15:59 +00:00
scan.go all: avoid string(i) where i has type int 2020-02-26 04:38:19 +00:00
stringer_example_test.go
stringer_test.go