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:
@@ -4,13 +4,9 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"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
|
||||
}
|
||||
@@ -45,7 +41,7 @@ func (widget *Widget) Refresh() {
|
||||
func (widget *Widget) contentFrom(onCallResponse *OnCallResponse) string {
|
||||
str := ""
|
||||
|
||||
displayEmpty := Config.UBool("wtf.mods.opsgenie.displayEmpty", true)
|
||||
displayEmpty := wtf.Config.UBool("wtf.mods.opsgenie.displayEmpty", true)
|
||||
|
||||
for _, data := range onCallResponse.OnCallData {
|
||||
if (len(data.Recipients) == 0) && (displayEmpty == false) {
|
||||
|
||||
Reference in New Issue
Block a user