Add -v to output version number

This commit is contained in:
z0mbix 2021-11-16 15:30:33 +00:00
parent d536a659bd
commit d63de52458
No known key found for this signature in database
GPG key ID: FFCE5C105D81AB88
4 changed files with 25 additions and 1 deletions

View file

@ -48,6 +48,8 @@ func realMain() int {
cfg, out, err := config.FromFlags(os.Args[0], os.Args[1:])
if cfg.Help {
return 0
} else if cfg.Version {
return 0
} else if out != "" {
fmt.Println(out)
return 1