2
0
mirror of https://github.com/ViViDboarder/gotifier.git synced 2024-12-21 17:07:35 +00:00

Remove logs and use Run instead of Start

This commit is contained in:
ViViDboarder 2014-06-19 12:55:15 -07:00
parent 17969495fd
commit 0f19f3d7c5

View File

@ -1,7 +1,7 @@
package gotifier
import (
"log"
//"log"
"os/exec"
)
@ -15,15 +15,15 @@ type Notification struct {
}
func (notif Notification) Push() bool {
log.Println("Pushing notification")
//log.Println("Pushing notification")
if activeCmd == nil {
log.Println("No active notification command found")
//log.Println("No active notification command found")
return false
}
cmd := (*activeCmd).Command(notif)
cmd.Start()
cmd.Run()
return true
}
@ -81,13 +81,13 @@ func nonNull(vals ...string) string {
}
func init() {
log.Println("Initing Gotifier")
//log.Println("Initing Gotifier")
for _, cmd := range notifiers {
path, err := exec.LookPath(cmd.Name)
if err == nil && path != "" {
activeCmd = &cmd
activeCmd.Path = path
log.Println("Found notifier command: " + path)
//log.Println("Found notifier command: " + path)
return
}
}