func (l linuxNotificator) pushCritical(title string, text string, iconPath string) *exec.Cmd {
	return exec.Command("notify-send", "-i", iconPath, title, text, "-a", l.AppName, "-u", "critical")
}
Causes the notification to stick around until clicked.
package notificator
import (
	"fmt"
	"os/exec"
	"runtime"
	"strconv"
	"strings"
)
type Options struct {
	DefaultIcon string
	AppName     string
}
const (
	UR_NORMAL   = "normal"
	UR_CRITICAL = "critical"
)
type notifier interface {
	push(title string, text string, iconPath string) *exec.Cmd
	pushCritical(title string, text string, iconPath string) *exec.Cmd
}
type Notificator struct {
	notifier    notifier
	defaultIcon string
}
func (n Notificator) Push(title string, text string, iconPath string, urgency string) error {
	icon := n.defaultIcon
	if iconPath != "" {
		icon = iconPath
	}
	if urgency == UR_CRITICAL {
		return n.notifier.pushCritical(title, text, icon).Run()
	}
	return n.notifier.push(title, text, icon).Run()
}
type osxNotificator struct {
	AppName string
}
func (o osxNotificator) push(title string, text string, iconPath string) *exec.Cmd {
	if CheckTermNotif() {
		return exec.Command("terminal-notifier", "-title", o.AppName, "-message", text, "-subtitle", title, "-appIcon", iconPath)
	} else if CheckMacOSVersion() {
		title = strings.Replace(title, `"`, `\"`, -1)
		text = strings.Replace(text, `"`, `\"`, -1)
		notification := fmt.Sprintf("display notification \"%s\" with title \"%s\" subtitle \"%s\"", text, o.AppName, title)
		return exec.Command("osascript", "-e", notification)
	}
	return exec.Command("growlnotify", "-n", o.AppName, "--image", iconPath, "-m", title)
}
func (o osxNotificator) pushCritical(title string, text string, iconPath string) *exec.Cmd {
	if CheckTermNotif() {
		return exec.Command("terminal-notifier", "-title", o.AppName, "-message", text, "-subtitle", title, "-timeout", "30")
	} else if CheckMacOSVersion() {
		notification := fmt.Sprintf("display notification \"%s\" with title \"%s\" subtitle \"%s\"", text, o.AppName, title)
		return exec.Command("osascript", "-e", notification)
	}
	return exec.Command("growlnotify", "-n", o.AppName, "--image", iconPath, "-m", title)
}
type linuxNotificator struct {
	AppName string
}
func (l linuxNotificator) push(title string, text string, iconPath string) *exec.Cmd {
	return exec.Command("notify-send", "-i", iconPath, title, text, "-a", l.AppName)
}