notifier.go 278 B

123456789101112131415161718
  1. package main
  2. import (
  3. "fmt"
  4. "github.com/gen2brain/beeep"
  5. )
  6. type Message struct {
  7. Title string
  8. Description string
  9. }
  10. func Notify(message *Message) {
  11. err := beeep.Notify(message.Title, message.Description, "assets/information.png")
  12. if err != nil {
  13. fmt.Println(err)
  14. }
  15. }