From 89f3712347257d856b1b98af9b88a7dcd42469dc Mon Sep 17 00:00:00 2001 From: kingxt Date: Tue, 1 Sep 2020 11:08:19 +0800 Subject: [PATCH] remove no need empty line (#29) * rebase upstream * rebase * trim no need line * trim no need line * trim no need line * trim no need line Co-authored-by: kingxt --- tools/goctl/api/format/format.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/goctl/api/format/format.go b/tools/goctl/api/format/format.go index 4b14c3d7..f43d2230 100644 --- a/tools/goctl/api/format/format.go +++ b/tools/goctl/api/format/format.go @@ -98,6 +98,7 @@ func ApiFormat(path string, printToConsole bool) error { _, err := fmt.Print(result) return err } + result = strings.TrimSpace(result) return ioutil.WriteFile(path, []byte(result), os.ModePerm) }