go-xkcdreader/xkcdreader/app.go
surtur f099f43f05
All checks were successful
continuous-integration/drone/push Build is passing
go: move app logic to xkcdreader package
2022-05-19 17:24:00 +02:00

25 lines
464 B
Go

package xkcdreader
import (
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/widget"
"git.dotya.ml/wanderer/go-xkcdreader/cmd"
)
const appGreeting = "welcome to go-xkcdreader"
// RunApp performs sets up and runs the main application
func RunApp() {
a := app.New()
w := a.NewWindow(cmd.GetAppName())
w.SetContent(makeGreeting())
w.ShowAndRun()
}
// makeGreeting creates a greeting label
func makeGreeting() *widget.Label {
return widget.NewLabel(appGreeting)
}