From f050fe49dfd0f742149b1719c3814daec6e0b3fc Mon Sep 17 00:00:00 2001 From: Radu Ioan Fericean Date: Thu, 2 Apr 2015 17:57:37 +0300 Subject: [PATCH] simplified ConcatenatedKey --- utils/coreutils.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/utils/coreutils.go b/utils/coreutils.go index b72776b3a..5f2eb33b8 100644 --- a/utils/coreutils.go +++ b/utils/coreutils.go @@ -254,14 +254,7 @@ func ParseZeroRatingSubject(rateSubj string) (time.Duration, error) { } func ConcatenatedKey(keyVals ...string) string { - resKey := "" - for idx, key := range keyVals { - if idx != 0 { - resKey += CONCATENATED_KEY_SEP - } - resKey += key - } - return resKey + return strings.Join(keyVals, CONCATENATED_KEY_SEP) } func RatingSubjectAliasKey(tenant, subject string) string {