4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 18:59:24 +00:00

Refactor using factory

This commit is contained in:
Wim
2018-02-27 00:33:21 +01:00
parent 5fbd8a3be0
commit 2bac867382
15 changed files with 279 additions and 371 deletions

View File

@ -2,7 +2,7 @@ package config
import (
"github.com/BurntSushi/toml"
"log"
log "github.com/sirupsen/logrus"
"os"
"reflect"
"strings"
@ -143,7 +143,7 @@ type SameChannelGateway struct {
type Config struct {
Api map[string]Protocol
IRC map[string]Protocol
Irc map[string]Protocol
Mattermost map[string]Protocol
Matrix map[string]Protocol
Slack map[string]Protocol
@ -164,6 +164,7 @@ type BridgeConfig struct {
General *Protocol
Account string
Remote chan Message
Log *log.Entry
}
func NewConfig(cfgfile string) *Config {