add notifications
This commit is contained in:
8
app.go
8
app.go
@ -3,6 +3,8 @@ package main
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/gen2brain/beeep"
|
||||
)
|
||||
|
||||
// App struct
|
||||
@ -12,6 +14,7 @@ type App struct {
|
||||
|
||||
// NewApp creates a new App application struct
|
||||
func NewApp() *App {
|
||||
|
||||
return &App{}
|
||||
}
|
||||
|
||||
@ -19,6 +22,11 @@ func NewApp() *App {
|
||||
// so we can call the runtime methods
|
||||
func (a *App) startup(ctx context.Context) {
|
||||
a.ctx = ctx
|
||||
|
||||
err := beeep.Notify("Hello", "World", "")
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
}
|
||||
|
||||
// Greet returns a greeting for the given name
|
||||
|
Reference in New Issue
Block a user