Browse Source

Added version number

master v0.1.1
parent
commit
766949edc5
  1. 9
      src/main.go

9
src/main.go

@ -35,13 +35,15 @@ import (
"unbewohnte/wecr/worker" "unbewohnte/wecr/worker"
) )
const version = "v0.1.1"
const ( const (
defaultConfigFile string = "conf.json" defaultConfigFile string = "conf.json"
defaultOutputFile string = "output.json" defaultOutputFile string = "output.json"
) )
var ( var (
version = flag.Bool( printVersion = flag.Bool(
"version", false, "version", false,
"Print version and exit", "Print version and exit",
) )
@ -77,9 +79,10 @@ func init() {
// parse and process flags // parse and process flags
flag.Parse() flag.Parse()
if *version { if *printVersion {
fmt.Printf( 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) os.Exit(0)
} }

Loading…
Cancel
Save