summaryrefslogtreecommitdiffstats
path: root/bridge/gitter/gitter.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-03-04 23:52:14 +0100
committerWim <wim@42.be>2018-03-04 23:52:14 +0100
commitf2f1d874e1b4f997c111de87121eec98eef66381 (patch)
tree34a44e866c053ef298d5482370208a0bb9dc4738 /bridge/gitter/gitter.go
parent25a72113b122f984c904b24c4af23a1cba1eff45 (diff)
downloadmatterbridge-msglm-f2f1d874e1b4f997c111de87121eec98eef66381.tar.gz
matterbridge-msglm-f2f1d874e1b4f997c111de87121eec98eef66381.tar.bz2
matterbridge-msglm-f2f1d874e1b4f997c111de87121eec98eef66381.zip
Use viper (github.com/spf13/viper) for configuration
Diffstat (limited to 'bridge/gitter/gitter.go')
-rw-r--r--bridge/gitter/gitter.go8
1 files changed, 4 insertions, 4 deletions
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