2019-12-07 23:24:21 +00:00
|
|
|
package notifier
|
|
|
|
|
2019-12-18 18:04:25 +00:00
|
|
|
import "gopkg.in/toast.v1"
|
|
|
|
|
2019-12-07 23:24:21 +00:00
|
|
|
func Notify(appName string, title string, message string, icon string) error {
|
2019-12-18 18:04:25 +00:00
|
|
|
notification := toast.Notification{
|
|
|
|
AppID: appName,
|
|
|
|
Title: title,
|
|
|
|
Message: message,
|
|
|
|
Icon: icon,
|
|
|
|
};
|
|
|
|
|
|
|
|
err := notification.Push();
|
|
|
|
return err;
|
2019-12-07 23:24:21 +00:00
|
|
|
}
|