embed Version string in app
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
* print version on app startup
This commit is contained in:
parent
c05fc6c995
commit
f009bb2cc1
9
main.go
9
main.go
@ -9,7 +9,12 @@ import (
|
|||||||
|
|
||||||
const appGreeting = "welcome to go-xkcdreader"
|
const appGreeting = "welcome to go-xkcdreader"
|
||||||
|
|
||||||
|
// Version provides app version string
|
||||||
|
const Version = "0.0.0"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
fmt.Println("Starting go-xkcdreader " + getVersion())
|
||||||
|
|
||||||
a := app.New()
|
a := app.New()
|
||||||
w := a.NewWindow("go-xkcd_reader")
|
w := a.NewWindow("go-xkcd_reader")
|
||||||
|
|
||||||
@ -23,3 +28,7 @@ func main() {
|
|||||||
func makeGreeting() *widget.Label {
|
func makeGreeting() *widget.Label {
|
||||||
return widget.NewLabel(appGreeting)
|
return widget.NewLabel(appGreeting)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getVersion() string {
|
||||||
|
return "v" + Version
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user