Go: refactor UUID functions (#16695)

As title

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-07-07 17:22:08 +08:00
committed by GitHub
parent 5236c8f659
commit 7df7384b21
38 changed files with 104 additions and 170 deletions

View File

@@ -21,8 +21,6 @@ import (
"path"
"regexp"
"strings"
"github.com/google/uuid"
)
// splitNameCounter splits a filename into base name and counter
@@ -114,12 +112,3 @@ func ValidateName(name string) error {
return nil
}
// GenerateUUID generates a UUID without dashes
func GenerateUUID() string {
newID := strings.ReplaceAll(uuid.New().String(), "-", "")
if len(newID) > 32 {
newID = newID[:32]
}
return newID
}