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

This commit is contained in:
Rajiv Shah
2020-06-08 22:13:37 -04:00
committed by GitHub
parent 1a374f9734
commit 4782f76048
3 changed files with 6 additions and 6 deletions

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()
}