Store version in a var that is being passed as an arg of a compiler.
This commit is contained in:
parent
931fade41d
commit
17ebe18b8b
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user