
go生成UUID
go
package main
import (
"github.com/google/uuid"
)
// GenerateUUID generates a new UUID and returns it as a string.
// Example: 6ba7b810-9dad-11d1-80b4-00c04fd430c8
func GenerateUUID() string {
id := uuid.New()
return id.String()
}
