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:
@@ -7,7 +7,7 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
)
|
||||
|
||||
type SystemInfo struct {
|
||||
@@ -32,7 +32,7 @@ func NewSystemInfo() *SystemInfo {
|
||||
cmd = exec.Command("sw_vers", arg...)
|
||||
}
|
||||
|
||||
raw := wtf.ExecuteCommand(cmd)
|
||||
raw := utils.ExecuteCommand(cmd)
|
||||
|
||||
for _, row := range strings.Split(raw, "\n") {
|
||||
parts := strings.Split(row, ":")
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
"github.com/wtfutil/wtf/view"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
type Widget struct {
|
||||
@@ -50,7 +50,7 @@ func (widget *Widget) Refresh() {
|
||||
}
|
||||
|
||||
func (widget *Widget) prettyDate() string {
|
||||
str, err := time.Parse(wtf.TimestampFormat, widget.Date)
|
||||
str, err := time.Parse(utils.TimestampFormat, widget.Date)
|
||||
|
||||
if err != nil {
|
||||
return err.Error()
|
||||
|
||||
Reference in New Issue
Block a user