]> Cypherpunks repositories - gostls13.git/commit
fmt: allow # and x together for strings
authorRob Pike <r@golang.org>
Wed, 26 Sep 2012 20:21:38 +0000 (06:21 +1000)
committerRob Pike <r@golang.org>
Wed, 26 Sep 2012 20:21:38 +0000 (06:21 +1000)
commitffea835b8f18681f2736a6b88b83aa27baf0a575
tree95ddf1e814af541fcb61edac77c75ea13ff4745b
parent7014bc64b1be8f85fff75ec13f8597b6a6aed366
fmt: allow # and x together for strings
Silly and small but easy to be consistent.
To make it worthwhile, I eliminated an allocation when using
%x on a byte slice.

Fixes #4149.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6574046
src/pkg/fmt/fmt_test.go
src/pkg/fmt/format.go
src/pkg/fmt/print.go