summaryrefslogtreecommitdiff
path: root/src/pkg/fmt
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-02-25 16:43:43 -0800
committerRuss Cox <rsc@golang.org>2010-02-25 16:43:43 -0800
commit5573ba3e9446ac831263a70ef2c213c0cb2ed191 (patch)
tree7a6dbedcd1b12f72c2ea54b2c69c3b684ca945df /src/pkg/fmt
parentaf6c4633cbd51c9b7794a160d420c536957b503b (diff)
downloadgolang-5573ba3e9446ac831263a70ef2c213c0cb2ed191.tar.gz
use []byte("abc") in place of []byte{'a', 'b', 'c'}
R=gri CC=golang-dev http://codereview.appspot.com/223059
Diffstat (limited to 'src/pkg/fmt')
-rw-r--r--src/pkg/fmt/print.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/pkg/fmt/print.go b/src/pkg/fmt/print.go
index ffe187a31..ecb8adbc3 100644
--- a/src/pkg/fmt/print.go
+++ b/src/pkg/fmt/print.go
@@ -87,15 +87,15 @@ import (
// Some constants in the form of bytes, to avoid string overhead.
// Needlessly fastidious, I suppose.
var (
- trueBytes = []byte{'t', 'r', 'u', 'e'}
- falseBytes = []byte{'f', 'a', 'l', 's', 'e'}
- commaSpaceBytes = []byte{',', ' '}
- nilAngleBytes = []byte{'<', 'n', 'i', 'l', '>'}
- nilParenBytes = []byte{'(', 'n', 'i', 'l', ')'}
- nilBytes = []byte{'n', 'i', 'l'}
- mapBytes = []byte{'m', 'a', 'p', '['}
- missingBytes = []byte{'m', 'i', 's', 's', 'i', 'n', 'g'}
- extraBytes = []byte{'?', '(', 'e', 'x', 't', 'r', 'a', ' '}
+ trueBytes = []byte("true")
+ falseBytes = []byte("false")
+ commaSpaceBytes = []byte(", ")
+ nilAngleBytes = []byte("<nil>")
+ nilParenBytes = []byte("(nil)")
+ nilBytes = []byte("nil")
+ mapBytes = []byte("map[")
+ missingBytes = []byte("missing")
+ extraBytes = []byte("?(extra ")
)
// State represents the printer state passed to custom formatters.