From e5be7082889029fe97ca7659aba62b65bb6fb4e7 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Wed, 21 Nov 2018 17:29:48 +0700 Subject: [PATCH] all: use single uuid package Internally, "pborman/uuid.NewUUID()" is calling "google/uuid.New()" that return nil when there is an error [1]. Both package use the same license. [1] https://github.com/pborman/uuid/blob/master/version1.go#L17 --- gossip.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gossip.go b/gossip.go index 2be2779..e73ddb8 100644 --- a/gossip.go +++ b/gossip.go @@ -8,12 +8,12 @@ import ( "sync" "time" + "github.com/google/uuid" "github.com/hashicorp/memberlist" "github.com/micro/go-log" "github.com/micro/go-micro/cmd" "github.com/micro/go-micro/registry" "github.com/mitchellh/hashstructure" - "github.com/pborman/uuid" ) type action int @@ -106,7 +106,7 @@ func configure(g *gossipRegistry, opts ...registry.Option) error { c := memberlist.DefaultLocalConfig() c.BindPort = 0 - c.Name = hostname + "-" + uuid.NewUUID().String() + c.Name = hostname + "-" + uuid.New().String() c.Delegate = &delegate{ updates: g.updates, broadcasts: broadcasts, @@ -315,7 +315,7 @@ func (m *gossipRegistry) subscribe() (chan *registry.Result, chan bool) { next := make(chan *registry.Result, 10) exit := make(chan bool) - id := uuid.NewUUID().String() + id := uuid.New().String() m.s.Lock() m.subs[id] = next