mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-13 16:38:26 +08:00
Go: refactor UUID functions (#16695)
As title --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user