embed Version string in app
All checks were successful
continuous-integration/drone/push Build is passing

* print version on app startup
This commit is contained in:
surtur 2022-05-10 20:41:06 +02:00
parent c05fc6c995
commit f009bb2cc1
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -9,7 +9,12 @@
const appGreeting = "welcome to go-xkcdreader"
// Version provides app version string
const Version = "0.0.0"
func main() {
fmt.Println("Starting go-xkcdreader " + getVersion())
a := app.New()
w := a.NewWindow("go-xkcd_reader")
@ -23,3 +28,7 @@ func main() {
func makeGreeting() *widget.Label {
return widget.NewLabel(appGreeting)
}
func getVersion() string {
return "v" + Version
}