]> Cypherpunks repositories - gostls13.git/commit
fmt: don't put 0x on every byte of a compact hex-encoded string
authorRob Pike <r@golang.org>
Mon, 16 Jun 2014 17:45:05 +0000 (10:45 -0700)
committerRob Pike <r@golang.org>
Mon, 16 Jun 2014 17:45:05 +0000 (10:45 -0700)
commit311e28636ab1b41a10510a46fe1c8728e8713057
treeb6289120267ee1e58cc414671703d097a6a6f04f
parentbe0079abe1eff5b4d123a249ce6a14da279217a0
fmt: don't put 0x on every byte of a compact hex-encoded string
Printf("%x", "abc") was "0x610x620x63"; is now "0x616263", which
is surely better.
Printf("% #x", "abc") is still "0x61 0x62 0x63".

Fixes #8080.

LGTM=bradfitz, gri
R=golang-codereviews, bradfitz, gri
CC=golang-codereviews
https://golang.org/cl/106990043
src/pkg/fmt/fmt_test.go
src/pkg/fmt/format.go