diff --git a/engine/aliases.go b/engine/aliases.go index 419a70970..eda219baa 100644 --- a/engine/aliases.go +++ b/engine/aliases.go @@ -245,8 +245,9 @@ func (am *AliasHandler) RemoveReverseAlias(attr AttrReverseAlias, reply *string) defer am.mu.Unlock() rKey := utils.REVERSE_ALIASES_PREFIX + attr.Alias + attr.Target + attr.Context if x, err := cache2go.Get(rKey); err == nil { - existingKeys := x.(map[string]struct{}) - for key := range existingKeys { + existingKeys := x.(map[interface{}]struct{}) + for iKey := range existingKeys { + key := iKey.(string) // get destination id elems := strings.Split(key, utils.CONCATENATED_KEY_SEP) if len(elems) > 0 { @@ -281,9 +282,9 @@ func (am *AliasHandler) GetReverseAlias(attr AttrReverseAlias, result *map[strin aliases := make(map[string][]*Alias) rKey := utils.REVERSE_ALIASES_PREFIX + attr.Alias + attr.Target + attr.Context if x, err := cache2go.Get(rKey); err == nil { - existingKeys := x.(map[string]struct{}) - for key := range existingKeys { - + existingKeys := x.(map[interface{}]struct{}) + for iKey := range existingKeys { + key := iKey.(string) // get destination id elems := strings.Split(key, utils.CONCATENATED_KEY_SEP) var destID string