Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 66ce9e39de8b37edf6d3491bc01305f3af8f2663 Author: Wim <wim@42.be> Date: Sat Feb 01 15:23:50 2020 +0000 Fail with message instead of panic. #988 (#991) diff --git a/bridge/bridge.go b/bridge/bridge.go index fdc1ec8..5612e35 100644 --- a/bridge/bridge.go +++ b/bridge/bridge.go @@ -16 +17 @@  package bridge    import ( + "log"   "strings"   "sync"   @@ -416 +4210 @@ type Factory func(*Config) Bridger    func New(bridge *config.Bridge) *Bridge {   accInfo := strings.Split(bridge.Account, ".") + if len(accInfo) != 2 { + log.Fatalf("config failure, account incorrect: %s", bridge.Account) + } +   protocol := accInfo[0]   name := accInfo[1]