mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Properly scope Config to the wtf package and remove it as a dependency from everywhere else
This commit is contained in:
@@ -5,14 +5,10 @@ import (
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
// Config is a pointer to the global config object
|
||||
var Config *config.Config
|
||||
|
||||
const HelpText = `
|
||||
Keyboard commands for Textfile:
|
||||
|
||||
@@ -33,7 +29,7 @@ func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
|
||||
TextWidget: wtf.NewTextWidget(" Text File ", "textfile", true),
|
||||
|
||||
app: app,
|
||||
filePath: Config.UString("wtf.mods.textfile.filePath"),
|
||||
filePath: wtf.Config.UString("wtf.mods.textfile.filePath"),
|
||||
pages: pages,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user