summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2016-11-07 10:28:46 -0800
committerJosh Bleecher Snyder <josharian@gmail.com>2017-03-14 01:18:20 +0000
commit0fd6df352205e2781ab34349527cf677b6c1283f (patch)
tree0447aac69df94c3d1856e3226576d8dede370f58
parentec091b6af2ad6f33f3b36c39171d7ef65b12668b (diff)
downloadgo-git-0fd6df352205e2781ab34349527cf677b6c1283f.tar.gz
cmd/compile: simplify printing of constant bools
Change-Id: I9339e83e39075826bf5819e55804a94208fe84ae Reviewed-on: https://go-review.googlesource.com/38140 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-rw-r--r--src/cmd/compile/internal/gc/fmt.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/gc/fmt.go b/src/cmd/compile/internal/gc/fmt.go
index b12bf5e4f9..7b4559bbd0 100644
--- a/src/cmd/compile/internal/gc/fmt.go
+++ b/src/cmd/compile/internal/gc/fmt.go
@@ -433,11 +433,7 @@ func (v Val) vconv(s fmt.State, flag FmtFlag) {
fmt.Fprint(s, strconv.Quote(u))
case bool:
- t := "false"
- if u {
- t = "true"
- }
- fmt.Fprint(s, t)
+ fmt.Fprint(s, u)
case *NilVal:
fmt.Fprint(s, "nil")