summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bridge/bridge.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/bridge/bridge.go b/bridge/bridge.go
index fdc1ec8b..5612e35d 100644
--- a/bridge/bridge.go
+++ b/bridge/bridge.go
@@ -1,6 +1,7 @@
package bridge
import (
+ "log"
"strings"
"sync"
@@ -41,6 +42,10 @@ 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]