refactor(ui): uncuddle return statement in NewApp()
This commit is contained in:
parent
4c67f93017
commit
f4283093ad
2 changed files with 4 additions and 1 deletions
4
main.go
4
main.go
|
|
@ -13,6 +13,7 @@ const keyringServiceName = "discordo"
|
|||
|
||||
func main() {
|
||||
app := ui.NewApp()
|
||||
app.EnableMouse(app.Config.General.Mouse)
|
||||
|
||||
token := os.Getenv("DISCORDO_TOKEN")
|
||||
if token == "" {
|
||||
|
|
@ -85,7 +86,8 @@ func main() {
|
|||
app.SetRoot(loginForm, true)
|
||||
}
|
||||
|
||||
if err := app.EnableMouse(app.Config.General.Mouse).Run(); err != nil {
|
||||
err := app.Run()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ type App struct {
|
|||
|
||||
func NewApp() *App {
|
||||
s, _ := discordgo.New()
|
||||
|
||||
return &App{
|
||||
Application: tview.NewApplication(),
|
||||
MainFlex: tview.NewFlex(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue