]> Cypherpunks repositories - gostls13.git/commit
fmt: avoid badverb formatting for %q when used with integers
authorMartin Möhrmann <moehrmann@google.com>
Mon, 20 Jul 2020 05:57:06 +0000 (07:57 +0200)
committerMartin Möhrmann <moehrmann@google.com>
Mon, 17 Aug 2020 04:55:28 +0000 (04:55 +0000)
commit99f179f55a66f35dc7861fa411b42ed61bd0df31
tree9d514d3baf46254fa83ec1ae139baeda4dea37fe
parent51ac0f0f4cb432204dee3d434335fd1e61ca8446
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>
src/fmt/fmt_test.go
src/fmt/print.go