diff options
author | Ian Gudger <igudger@google.com> | 2018-05-07 16:08:03 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-05-07 16:08:52 -0700 |
commit | d5104a56e56ece50d3ec562edc31493516960c0c (patch) | |
tree | 6e1b49a035c0e5d72c4afcf2b979459dc19a3088 /tools | |
parent | 5666e35c43cadf834845359d009322e67f1e6a0d (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
Diffstat (limited to 'tools')
-rw-r--r-- | tools/go_stateify/main.go | 6 |
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())) |