diff options
author | Wim <wim@42.be> | 2018-03-04 23:52:14 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2018-03-04 23:52:14 +0100 |
commit | f2f1d874e1b4f997c111de87121eec98eef66381 (patch) | |
tree | 34a44e866c053ef298d5482370208a0bb9dc4738 /bridge/sshchat/sshchat.go | |
parent | 25a72113b122f984c904b24c4af23a1cba1eff45 (diff) | |
download | matterbridge-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/sshchat/sshchat.go')
-rw-r--r-- | bridge/sshchat/sshchat.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bridge/sshchat/sshchat.go b/bridge/sshchat/sshchat.go index c11d3daa..3204d734 100644 --- a/bridge/sshchat/sshchat.go +++ b/bridge/sshchat/sshchat.go @@ -14,18 +14,18 @@ import ( type Bsshchat struct { r *bufio.Scanner w io.WriteCloser - *config.BridgeConfig + *bridge.Config } -func New(cfg *config.BridgeConfig) bridge.Bridger { - return &Bsshchat{BridgeConfig: cfg} +func New(cfg *bridge.Config) bridge.Bridger { + return &Bsshchat{Config: cfg} } func (b *Bsshchat) Connect() error { var err error - b.Log.Infof("Connecting %s", b.Config.Server) + b.Log.Infof("Connecting %s", b.GetString("Server")) go func() { - err = sshd.ConnectShell(b.Config.Server, b.Config.Nick, func(r io.Reader, w io.WriteCloser) error { + err = sshd.ConnectShell(b.GetString("Server"), b.GetString("Nick"), func(r io.Reader, w io.WriteCloser) error { b.r = bufio.NewScanner(r) b.w = w b.r.Scan() |