mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: support network manager connection profiles (#23469)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
@@ -17,6 +17,10 @@ package stringutils2
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/zeebo/xxh3"
|
||||
)
|
||||
|
||||
func GenId(ids ...string) string {
|
||||
@@ -26,3 +30,9 @@ func GenId(ids ...string) string {
|
||||
}
|
||||
return fmt.Sprintf("%x", h.Sum(nil))
|
||||
}
|
||||
|
||||
func GenUuid(ids ...string) string {
|
||||
h := xxh3.HashString128(strings.Join(ids, "")).Bytes()
|
||||
guid, _ := uuid.FromBytes(h[:])
|
||||
return guid.String()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user