This commit is contained in:
2025-04-01 17:57:35 +08:00
parent 7857015405
commit a5caa734c3
36 changed files with 1503 additions and 318 deletions

View File

@@ -0,0 +1,16 @@
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
}