1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Closes #43. Add CommandRunner module to the app.

CommandRunner allows you to define a terminal command and arguments, run
it on a schedule, and view the output.

Examples:

   ping -3 cisco.com
This commit is contained in:
Chris Cummer
2018-05-17 17:15:03 -07:00
parent c3f14025ba
commit a62b910893
17 changed files with 74 additions and 50 deletions

View File

@@ -3,7 +3,6 @@ package opsgenie
import (
"fmt"
"strings"
"time"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
@@ -33,8 +32,8 @@ func (widget *Widget) Refresh() {
data, err := Fetch()
widget.UpdateRefreshedAt()
widget.View.SetTitle(" ⏰ On Call ")
widget.View.Clear()
if err != nil {
@@ -44,8 +43,6 @@ func (widget *Widget) Refresh() {
widget.View.SetWrap(false)
fmt.Fprintf(widget.View, "%s", widget.contentFrom(data))
}
widget.RefreshedAt = time.Now()
}
/* -------------------- Unexported Functions -------------------- */