shared/util.go
func RemoveDuplicatesFromString(s string, sep string) string {
	dup := sep + sep
	for s = strings.Replace(s, dup, sep, -1); strings.Contains(s, dup); s = strings.Replace(s, dup, sep, -1) {

	}
	return s
}
func RemoveDuplicatesFromString(s string, sep string) string {
	dup := sep + sep
	for s = strings.Replace(s, dup, sep, -1); strings.Contains(s, dup); s = strings.Replace(s, dup, sep, -1) {

	}
	return s
}
func RemoveDuplicatesFromString ( s string , sep string ) string { dup := sep + sep for s = strings . Replace ( s , dup , sep , - 1 ) ; strings . Contains ( s , dup ) ; s = strings . Replace ( s , dup , sep , - 1 ) { } return s }
// RemoveDuplicatesFromString removes all duplicates of the string 'sep'
// from the specified string 's'.  Leading and trailing occurrences of sep
// are NOT removed (duplicate leading/trailing are).  Performs poorly if
// there are multiple consecutive redundant separators.
RemoveDuplicatesFromString removes all duplicates of the string sep from the specified string s . Leading and trailing occurrences of sep are NOT removed ( duplicate leading / trailing are ) . Performs poorly if there are multiple consecutive redundant separators .