From c78cddd7de4c7f5a9d071b70e0452b11e3d55a7a Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 14 Apr 2011 16:33:29 -0700 Subject: [PATCH] gofmt: gofmt test harness bug fix Don't use the rewrite rule from a previous test for the next test if there is no rewrite rule provided. R=r, r2 CC=golang-dev https://golang.org/cl/4419045 --- src/cmd/gofmt/rewrite.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmd/gofmt/rewrite.go b/src/cmd/gofmt/rewrite.go index 631c513310c..47d1ac46ce0 100644 --- a/src/cmd/gofmt/rewrite.go +++ b/src/cmd/gofmt/rewrite.go @@ -19,6 +19,7 @@ import ( func initRewrite() { if *rewriteRule == "" { + rewrite = nil // disable any previous rewrite return } f := strings.Split(*rewriteRule, "->", -1)