From 81791bbf4291e28691ed2cfaaad357613c915174 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 3 Jun 2017 17:33:19 +0200 Subject: main.go: Move version string to `VERSION` variable Didn't really like having the application version intermixed with regular code. This separates it and makes it easier to see. --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index e685d25..63fdfe5 100644 --- a/main.go +++ b/main.go @@ -13,6 +13,8 @@ import ( "gopkg.in/alecthomas/kingpin.v2" ) +var VERSION string = "0.1.0" + type Config struct { Auth struct { Username string @@ -47,7 +49,7 @@ func main() { description := kingpin.Flag("description", "Description of work."). Short('m'). String() - kingpin.Version("0.1.0") + kingpin.Version(VERSION) kingpin.Parse() // Submit time entry -- cgit v1.2.3