From 766949edc512aaf6a9520515e5db7973010fdc69 Mon Sep 17 00:00:00 2001 From: Unbewohnte Date: Sun, 25 Dec 2022 15:53:24 +0300 Subject: [PATCH] Added version number --- src/main.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main.go b/src/main.go index eef3433..e89169d 100644 --- a/src/main.go +++ b/src/main.go @@ -35,13 +35,15 @@ import ( "unbewohnte/wecr/worker" ) +const version = "v0.1.1" + const ( defaultConfigFile string = "conf.json" defaultOutputFile string = "output.json" ) var ( - version = flag.Bool( + printVersion = flag.Bool( "version", false, "Print version and exit", ) @@ -77,9 +79,10 @@ func init() { // parse and process flags flag.Parse() - if *version { + if *printVersion { fmt.Printf( - "Wecr - crawl the web for data\n(c) 2022 Kasyanov Nikolay Alexeyevich (Unbewohnte)\n\n", + "Wecr %s - crawl the web for data\n(c) 2022 Kasyanov Nikolay Alexeyevich (Unbewohnte)\n", + version, ) os.Exit(0) }