From e1be3ed9a1ee18b3e8e3bfb6bd8e75e5a5e68553 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 14 Jul 2016 13:45:35 +0200 Subject: [PATCH] fix collecting newlines at the bottom --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 81e10b6..1fcb70a 100644 --- a/main.go +++ b/main.go @@ -167,7 +167,7 @@ func main() { "OldLog": readChangelog(), }) - if err := ioutil.WriteFile(cfg.ChangelogFile, buf.Bytes(), 0644); err != nil { + if err := ioutil.WriteFile(cfg.ChangelogFile, bytes.TrimSpace(buf.Bytes()), 0644); err != nil { log.Fatalf("Unable to write new changelog: %s", err) }