1
0
mirror of https://github.com/beego/bee.git synced 2025-07-01 17:20:17 +00:00
go simple
golint
structcheck
staticcheck
unused
unconvert
This commit is contained in:
Sergey Lanzman
2017-03-11 10:57:06 +02:00
parent 3d5b13d84e
commit feea8877c0
11 changed files with 71 additions and 86 deletions

View File

@ -28,7 +28,7 @@ func Notify(text, title string) {
}
func osxNotify(text, title string) {
cmd := &exec.Cmd{}
var cmd *exec.Cmd
if existTerminalNotifier() {
cmd = exec.Command("terminal-notifier", "-title", appName, "-message", text, "-subtitle", title)
} else if MacOSVersionSupport() {
@ -53,13 +53,9 @@ func existTerminalNotifier() bool {
err := cmd.Start()
if err != nil {
return false
} else {
err = cmd.Wait()
if err != nil {
return false
}
}
return true
err = cmd.Wait()
return err != nil
}
func MacOSVersionSupport() bool {