parent
fc30b1bacc
commit
7486555875
bridge
|
@ -1,6 +1,7 @@
|
||||||
package bridge
|
package bridge
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"log"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
@ -41,6 +42,10 @@ type Factory func(*Config) Bridger
|
||||||
|
|
||||||
func New(bridge *config.Bridge) *Bridge {
|
func New(bridge *config.Bridge) *Bridge {
|
||||||
accInfo := strings.Split(bridge.Account, ".")
|
accInfo := strings.Split(bridge.Account, ".")
|
||||||
|
if len(accInfo) != 2 {
|
||||||
|
log.Fatalf("config failure, account incorrect: %s", bridge.Account)
|
||||||
|
}
|
||||||
|
|
||||||
protocol := accInfo[0]
|
protocol := accInfo[0]
|
||||||
name := accInfo[1]
|
name := accInfo[1]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue