mirror of
https://github.com/Starlio-app/StarlioX
synced 2024-11-06 06:13:57 +03:00
20 lines
337 B
Go
20 lines
337 B
Go
package utils
|
|
|
|
import "gopkg.in/toast.v1"
|
|
|
|
func Notify(title, message string, action toast.Action) {
|
|
notification := toast.Notification{
|
|
AppID: "EveryNASA",
|
|
Title: title,
|
|
Message: message,
|
|
Duration: toast.Long,
|
|
Actions: []toast.Action{
|
|
action,
|
|
},
|
|
}
|
|
|
|
err := notification.Push()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|