mirror of
https://github.com/taigrr/wtf
synced 2026-03-26 00:22:21 -07:00
Add cfg/ as a top-level package concept
This commit is contained in:
7
wtf.go
7
wtf.go
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/rivo/tview"
|
||||
"github.com/senorprogrammer/wtf/bamboohr"
|
||||
"github.com/senorprogrammer/wtf/bargraph"
|
||||
"github.com/senorprogrammer/wtf/cfg"
|
||||
"github.com/senorprogrammer/wtf/clocks"
|
||||
"github.com/senorprogrammer/wtf/cmdrunner"
|
||||
"github.com/senorprogrammer/wtf/cryptoexchanges/bittrex"
|
||||
@@ -268,7 +269,7 @@ func makeWidgets(app *tview.Application, pages *tview.Pages) {
|
||||
}
|
||||
|
||||
func loadConfig(configFlag string) {
|
||||
Config = wtf.LoadConfigFile(configFlag)
|
||||
Config = cfg.LoadConfigFile(configFlag)
|
||||
}
|
||||
|
||||
func main() {
|
||||
@@ -285,8 +286,8 @@ func main() {
|
||||
|
||||
// Responsible for creating the configuration directory and default
|
||||
// configuration file if they don't already exist
|
||||
wtf.CreateConfigDir()
|
||||
wtf.WriteConfigFile()
|
||||
cfg.CreateConfigDir()
|
||||
cfg.WriteConfigFile()
|
||||
|
||||
loadConfig(cmdFlags.Config)
|
||||
os.Setenv("TERM", Config.UString("wtf.term", os.Getenv("TERM")))
|
||||
|
||||
Reference in New Issue
Block a user