cmd/gofmt: normalize number prefixes and exponents
Rewrite non-decimal number prefixes to always use a lower-case base ("0X" -> "0x", etc.), and rewrite exponents to use a lower-case 'e' or 'p'. Leave hexadecimal digits and 0-octals alone. Comparing the best time of 3 runs of `time go test -run All` with the time for a gofmt that doesn't do the rewrite shows no increase in runtime for this bulk gofmt application (in fact on my machine I see a small decline, probably due to cache effects). R=Go1.13 Updates #12711. Updates #19308. Updates #29008. Change-Id: I9c6ebed2ffa0a6a001c59412a73382090955f5a9 Reviewed-on: https://go-review.googlesource.com/c/160184Reviewed-by: Ian Lance Taylor <iant@golang.org>
Showing
Please register or sign in to comment