aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2017-06-03 17:33:19 +0200
committerTeddy Wing2017-06-03 17:33:19 +0200
commit81791bbf4291e28691ed2cfaaad357613c915174 (patch)
tree3f794accf3624808462c8af2f0f7f1c04d05714e
parente8bee60ed342ab4df93bf2fb582706ad7fd42546 (diff)
downloadtimetasker-81791bbf4291e28691ed2cfaaad357613c915174.tar.bz2
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.
-rw-r--r--main.go4
1 files changed, 3 insertions, 1 deletions
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