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:
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/checklist"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
)
|
||||
|
||||
func (widget *Widget) display() {
|
||||
@@ -54,5 +54,5 @@ func (widget *Widget) formattedItemLine(idx int, item *checklist.ChecklistItem,
|
||||
tview.Escape(item.Text),
|
||||
)
|
||||
|
||||
return wtf.HighlightableHelper(widget.View, row, idx, len(item.Text))
|
||||
return utils.HighlightableHelper(widget.View, row, idx, len(item.Text))
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/wtfutil/wtf/cfg"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
)
|
||||
|
||||
func (widget *Widget) initializeKeyboardControls() {
|
||||
@@ -50,7 +50,7 @@ func (widget *Widget) displayPrev() {
|
||||
|
||||
func (widget *Widget) openFile() {
|
||||
confDir, _ := cfg.WtfConfigDir()
|
||||
wtf.OpenFile(fmt.Sprintf("%s/%s", confDir, widget.filePath))
|
||||
utils.OpenFile(fmt.Sprintf("%s/%s", confDir, widget.filePath))
|
||||
}
|
||||
|
||||
func (widget *Widget) promoteSelected() {
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/cfg"
|
||||
"github.com/wtfutil/wtf/checklist"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
"github.com/wtfutil/wtf/view"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
"gopkg.in/yaml.v2"
|
||||
@@ -108,7 +109,7 @@ func (widget *Widget) load() {
|
||||
confDir, _ := cfg.WtfConfigDir()
|
||||
filePath := fmt.Sprintf("%s/%s", confDir, widget.filePath)
|
||||
|
||||
fileData, _ := wtf.ReadFileBytes(filePath)
|
||||
fileData, _ := utils.ReadFileBytes(filePath)
|
||||
|
||||
yaml.Unmarshal(fileData, &widget.list)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user