From d5104a56e56ece50d3ec562edc31493516960c0c Mon Sep 17 00:00:00 2001 From: Ian Gudger Date: Mon, 7 May 2018 16:08:03 -0700 Subject: 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 --- tools/go_stateify/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/go_stateify') 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())) -- cgit v1.2.3