mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Move the utils.go file into the /utils directory
This commit is contained in:
@@ -3,7 +3,7 @@ package cmdrunner
|
||||
import (
|
||||
"github.com/olebedev/config"
|
||||
"github.com/wtfutil/wtf/cfg"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
)
|
||||
|
||||
const defaultTitle = "CmdRunner"
|
||||
@@ -20,7 +20,7 @@ func NewSettingsFromYAML(name string, moduleConfig *config.Config, globalConfig
|
||||
settings := Settings{
|
||||
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, moduleConfig, globalConfig),
|
||||
|
||||
args: wtf.ToStrs(moduleConfig.UList("args")),
|
||||
args: utils.ToStrs(moduleConfig.UList("args")),
|
||||
cmd: moduleConfig.UString("cmd"),
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
"github.com/wtfutil/wtf/view"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
type Widget struct {
|
||||
@@ -61,5 +61,5 @@ func (widget *Widget) String() string {
|
||||
|
||||
func (widget *Widget) execute() string {
|
||||
cmd := exec.Command(widget.cmd, widget.args...)
|
||||
return wtf.ExecuteCommand(cmd)
|
||||
return utils.ExecuteCommand(cmd)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user