From 3a8b3b67032277c374bc72a7f6e5d0687c9f335e Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 14 Jul 2016 14:41:32 +0200 Subject: [PATCH] prevent running runtime checks in tests --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 2831614..a04c9cd 100644 --- a/main.go +++ b/main.go @@ -43,7 +43,7 @@ var ( version = "dev" ) -func init() { +func prepareRun() { if err := rconfig.Parse(&cfg); err != nil { log.Fatalf("Unable to parse commandline options: %s", err) } @@ -117,6 +117,8 @@ func quickTemplate(name string, tplSrc []byte, values map[string]interface{}) ([ } func main() { + prepareRun() + // Get last tag lastTag, err := gitSilent("describe", "--tags", "--abbrev=0")