Explorar o código

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 <dream4kingxt@163.com>
kingxt %!s(int64=4) %!d(string=hai) anos
pai
achega
89f3712347
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      tools/goctl/api/format/format.go

+ 1 - 0
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)
 }