summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2018-05-07 16:08:03 -0700
committerShentubot <shentubot@google.com>2018-05-07 16:08:52 -0700
commitd5104a56e56ece50d3ec562edc31493516960c0c (patch)
tree6e1b49a035c0e5d72c4afcf2b979459dc19a3088
parent5666e35c43cadf834845359d009322e67f1e6a0d (diff)
Improve consistency in go_stateify file generation
This also fixes the go_vet warning: error: Fprintln call ends with newline (vet) PiperOrigin-RevId: 195738471 Change-Id: Ic7a9df40eec1457ef03e6ee70872c497a676b53c
-rw-r--r--tools/go_stateify/main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/go_stateify/main.go b/tools/go_stateify/main.go
index 5eb4fe51f..6c3583c62 100644
--- a/tools/go_stateify/main.go
+++ b/tools/go_stateify/main.go
@@ -222,9 +222,9 @@ func main() {
}
// Emit the package name.
- fmt.Fprintf(outputFile, "// automatically generated by stateify.\n\n")
+ fmt.Fprint(outputFile, "// automatically generated by stateify.\n\n")
fmt.Fprintf(outputFile, "package %s\n\n", *pkg)
- fmt.Fprintln(outputFile, "import (")
+ fmt.Fprint(outputFile, "import (\n")
if *statePkg != "" {
fmt.Fprintf(outputFile, " \"%s\"\n", *statePkg)
}
@@ -233,7 +233,7 @@ func main() {
fmt.Fprintf(outputFile, " \"%s\"\n", i)
}
}
- fmt.Fprintln(outputFile, ")\n")
+ fmt.Fprint(outputFile, ")\n\n")
files := make([]*ast.File, 0, len(flag.Args()))