go-xkcdreader/main.go

38 lines
557 B
Go
Raw Normal View History

2022-03-12 10:29:25 +01:00
package main
import (
"fmt"
"git.dotya.ml/wanderer/go-xkcdreader/cmd"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/widget"
)
const appGreeting = "welcome to go-xkcdreader"
var version = cmd.GetShortVersion()
func main() {
cmd.Execute()
fmt.Println("Starting " + cmd.GetAppName() + " " + getVersion())
a := app.New()
w := a.NewWindow(cmd.GetAppName())
w.SetContent(makeGreeting())
w.ShowAndRun()
fmt.Println("Exited")
}
func makeGreeting() *widget.Label {
return widget.NewLabel(appGreeting)
}
func getVersion() string {
return version
}