From 0b8c2d86df4bfe32ff4534eec84cd56909c398e9 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 21 Jun 2019 00:18:07 -0600 Subject: [PATCH] v1.1.1: update docs, template conditionals --- gitver.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gitver.go b/gitver.go index 041b502..574fffa 100644 --- a/gitver.go +++ b/gitver.go @@ -209,9 +209,9 @@ package {{ .Package }} func init() { GitRev = "{{ .GitRev }}" - if "" != "{{ .Version }}" { - GitVersion = "{{ .Version }}" - } + {{- if .Version }} + GitVersion = "{{ .Version }}" + {{ end -}} GitTimestamp = "{{ .Timestamp }}" } `))