~skuzzymiglet/feef

502ad139bb816c2ea660c087326865a3d6f7a733 — skuzzymiglet 1 year, 5 months ago c73a9c4
Don't add newline to -f templates if they're empty
1 files changed, 4 insertions(+), 1 deletions(-)

M main.go
M main.go => main.go +4 -1
@@ 97,6 97,10 @@ func main() {

	client.Timeout = timeout

	if templateString != "" { // Empty means empty
		templateString = templateString + "\n"
	}

	switch {
	case memProfile:
		defer profile.Start(profile.MemProfile).Stop()


@@ 267,7 271,6 @@ func main() {
				io.Copy(os.Stdout, &tmplBuf)
				tmplBuf.Reset()
			}
			fmt.Println() // TODO: let template choose newline. but kinda eh
		}
	}
}