From f2f1d874e1b4f997c111de87121eec98eef66381 Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 4 Mar 2018 23:52:14 +0100 Subject: Use viper (github.com/spf13/viper) for configuration --- bridge/gitter/gitter.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bridge/gitter') diff --git a/bridge/gitter/gitter.go b/bridge/gitter/gitter.go index b7f69b1f..853640f5 100644 --- a/bridge/gitter/gitter.go +++ b/bridge/gitter/gitter.go @@ -14,17 +14,17 @@ type Bgitter struct { User *gitter.User Users []gitter.User Rooms []gitter.Room - *config.BridgeConfig + *bridge.Config } -func New(cfg *config.BridgeConfig) bridge.Bridger { - return &Bgitter{BridgeConfig: cfg} +func New(cfg *bridge.Config) bridge.Bridger { + return &Bgitter{Config: cfg} } func (b *Bgitter) Connect() error { var err error b.Log.Info("Connecting") - b.c = gitter.New(b.Config.Token) + b.c = gitter.New(b.GetString("Token")) b.User, err = b.c.GetUser() if err != nil { return err -- cgit v1.2.3