Permalink
Browse files

Fix call to uuid.NewV4()

  • Loading branch information...
peter-edge committed Feb 9, 2018
1 parent 2a81062 commit 0f4961c56eba15195f6670b06ff9f5b5bb43983e
Showing with 9 additions and 1 deletion.
  1. +9 −1 defaults.go
@@ -13,9 +13,17 @@ var (
// we just need ids to be unique across logging processes
// so we use a base ID and then add an atomic int
// it's not great but it's better than blocking on the mutex
instanceID = uuid.NewV4().String()
instanceID string
)

func init() {
id, err := uuid.NewV4()
if err != nil {
panic(err.Error())
}
instanceID = id.String()
}

type idAllocator struct {
id string
value uint64

0 comments on commit 0f4961c

Please sign in to comment.