mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-04 13:37:44 +00:00
Fix tests and make megacheck happy
This commit is contained in:
@ -23,7 +23,6 @@ import (
|
||||
"github.com/hashicorp/golang-lru"
|
||||
"github.com/peterhellberg/emojilib"
|
||||
"net/http"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
@ -450,14 +449,6 @@ func getChannelID(msg config.Message) string {
|
||||
return msg.Channel + msg.Account
|
||||
}
|
||||
|
||||
//getField returns the Protocol configuration for a specific protocol (field)
|
||||
func getField(cfg *config.Config, field string) map[string]config.Protocol {
|
||||
r := reflect.ValueOf(cfg)
|
||||
f := reflect.Indirect(r).FieldByName(field)
|
||||
i := f.Interface()
|
||||
return i.(map[string]config.Protocol)
|
||||
}
|
||||
|
||||
func isApi(account string) bool {
|
||||
return strings.HasPrefix(account, "api.")
|
||||
}
|
||||
|
Reference in New Issue
Block a user