mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Update template for DNSAgent and add new method V2ProcessEvent in SessionS
This commit is contained in:
committed by
Dan Christian Bogos
parent
ae5f2e1d6b
commit
4e2164b741
13
utils/map.go
13
utils/map.go
@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
package utils
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
@@ -275,3 +276,15 @@ func (fWp FlagsWithParams) ParamsSlice(subs string) (ps []string) {
|
||||
}
|
||||
return ps
|
||||
}
|
||||
|
||||
//func to convert from FlagsWithParams back to []string
|
||||
func (fWp FlagsWithParams) SliceFlags() (sls []string) {
|
||||
for key, _ := range fWp {
|
||||
if prmSlice := fWp.ParamsSlice(key); !reflect.DeepEqual(prmSlice, []string{}) {
|
||||
sls = append(sls, ConcatenatedKey(key, strings.Join(prmSlice, INFIELD_SEP)))
|
||||
} else {
|
||||
sls = append(sls, key)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user