17 lines
		
	
	
		
			357 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			357 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package convertor
 | |
| 
 | |
| import (
 | |
| 	"sort"
 | |
| 	"strings"
 | |
| 
 | |
| 	"management/internal/pkg/sliceutil"
 | |
| )
 | |
| 
 | |
| func HandleParentPath(parentPath string) string {
 | |
| 	parentPath = strings.ReplaceAll(parentPath, ",,", ",")
 | |
| 	paths := sliceutil.RemoveDuplicatesWithMap(strings.Split(parentPath, ","))
 | |
| 	sort.Strings(paths)
 | |
| 	parentPath = strings.Join(paths, ",") + ","
 | |
| 	return parentPath
 | |
| }
 |