kevinschoon-pomo/vendor/github.com/0xAX/notificator/example/main.go

25 lines
443 B
Go
Raw Normal View History

2018-02-01 15:44:56 +01:00
package main
import (
"../../notificator"
"log"
)
var notify *notificator.Notificator
func main() {
notify = notificator.New(notificator.Options{
DefaultIcon: "icon/default.png",
AppName: "My test App",
})
notify.Push("title", "text", "/home/user/icon.png", notificator.UR_NORMAL)
// Check errors
err := notify.Push("error", "ops =(", "/home/user/icon.png", notificator.UR_CRITICAL)
if err != nil {
log.Fatal(err)
}
}