beeep
provides a cross-platform library for sending desktop notifications, alerts and beeps.
Windows10未満の通知にmsg.exeではなくgrowlnotifyを使うよう変更。 for below Windows 10, changed to use growlnotify instead of msg.exe
オリジナルを踏襲し、Windows10未満はAlertに未対応(toastのみ)。
go get -u github.com/kamagasako/beeep
err := beeep.Beep(beeep.DefaultFreq, beeep.DefaultDuration)
if err != nil {
panic(err)
}
err := beeep.Notify("Title", "Message body", "assets/information.png")
if err != nil {
panic(err)
}
err := beeep.Alert("Title", "Message body", "assets/warning.png")
if err != nil {
panic(err)
}
For icons to show up when using Alert() or Notify(), you will need to bundle your application with a app icon.
For cross-platform dialogs and input boxes see dlgs.