1
0

Store version in a var that is being passed as an arg of a compiler.

This commit is contained in:
Alexander Andreev 2023-04-24 00:32:30 +04:00
parent 931fade41d
commit 17ebe18b8b
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -19,11 +19,13 @@ var configPath *string = flag.String("conf", "config.yaml", "path to configurati
var logToStdout *bool = flag.Bool("log-stdout", false, "write logs to stdout") var logToStdout *bool = flag.Bool("log-stdout", false, "write logs to stdout")
var showVersion *bool = flag.Bool("v", false, "show version") var showVersion *bool = flag.Bool("v", false, "show version")
var version string
func main() { func main() {
flag.Parse() flag.Parse()
if *showVersion { if *showVersion {
fmt.Println("dwelling-upload Ver. 23.10.0\nCopyright (c) 2022,2023 Alexander \"Arav\" Andreev <me@arav.su>") fmt.Println("dwelling-upload Ver. ", version, "\nCopyright (c) 2022,2023 Alexander \"Arav\" Andreev <me@arav.su>")
return return
} }