4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-02 10:26:18 +00:00

Fix golint linter issues and enable it in CI (#593)

This commit is contained in:
Duco van Amstel
2018-11-15 19:43:43 +00:00
committed by Wim
parent c89085bf44
commit ce21ba1545
24 changed files with 147 additions and 145 deletions

View File

@ -27,7 +27,7 @@ func NewRouter(cfg config.Config) (*Router, error) {
sgw := samechannelgateway.New(cfg)
gwconfigs := sgw.GetConfig()
for _, entry := range append(gwconfigs, cfg.ConfigValues().Gateway...) {
for _, entry := range append(gwconfigs, cfg.BridgeValues().Gateway...) {
if !entry.Enable {
continue
}
@ -77,7 +77,7 @@ func (r *Router) getBridge(account string) *bridge.Bridge {
func (r *Router) handleReceive() {
for msg := range r.Message {
msg := msg // scopelint
if msg.Event == config.EVENT_FAILURE {
if msg.Event == config.EventFailure {
Loop:
for _, gw := range r.Gateways {
for _, br := range gw.Bridges {
@ -88,7 +88,7 @@ func (r *Router) handleReceive() {
}
}
}
if msg.Event == config.EVENT_REJOIN_CHANNELS {
if msg.Event == config.EventRejoinChannels {
for _, gw := range r.Gateways {
for _, br := range gw.Bridges {
if msg.Account == br.Account {