1
0
mirror of https://github.com/taigrr/wtf synced 2026-03-30 08:15:15 -07:00

Properly scope Config to the wtf package and remove it as a dependency from everywhere else

This commit is contained in:
Chris Cummer
2018-06-16 14:59:22 -07:00
parent abedee0ce0
commit 66b69471d0
42 changed files with 126 additions and 251 deletions

View File

@@ -3,13 +3,9 @@ package clocks
import (
"time"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
@@ -21,7 +17,7 @@ func NewWidget() *Widget {
TextWidget: wtf.NewTextWidget(" World Clocks ", "clocks", false),
}
widget.clockColl = widget.buildClockCollection(Config.UMap("wtf.mods.clocks.locations"))
widget.clockColl = widget.buildClockCollection(wtf.Config.UMap("wtf.mods.clocks.locations"))
return &widget
}