Replace satori/go.uuid with google/uuid (#89)

This commit is contained in:
Rajiv Shah authored and GitHub committed 2020-06-09 10:13:37 +08:00
1 parent 1a374f9734
commit 4782f76048
3 files changed
+6 -6

No files matched your search

+3 -3
View File
@@ -9,7 +9,7 @@ import (
"go.uber.org/zap"
"github.com/eclipse/paho.mqtt.golang/packets"
uuid "github.com/satori/go.uuid"
uuid "github.com/google/uuid"
)
const (
@@ -114,9 +114,9 @@ func delSubMap(m map[string]uint64, topic string) uint64 {
}
func GenUniqueId() string {
id, err := uuid.NewV4()
id, err := uuid.NewRandom()
if err != nil {
log.Error("uuid.NewV4() return error: " + err.Error())
log.Error("uuid.NewRandom() returned an error: " + err.Error())
}
return id.String()
}