1
0
mirror of https://github.com/taigrr/wtf synced 2026-03-29 12:15:16 -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,14 +3,10 @@ package newrelic
import (
"fmt"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
nr "github.com/yfronto/newrelic"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
}
@@ -79,7 +75,7 @@ func (widget *Widget) contentFrom(deploys []nr.ApplicationDeployment) string {
revisions = append(revisions, deploy.Revision)
if len(revisions) == Config.UInt("wtf.mods.newrelic.deployCount", 5) {
if len(revisions) == wtf.Config.UInt("wtf.mods.newrelic.deployCount", 5) {
break
}
}