Permalink
Browse files

Merge pull request #4 from peter-edge/fix-uuid-newv4

Fix call to uuid.NewV4()
  • Loading branch information...
peter-edge committed Feb 9, 2018
2 parents 2a81062 + 0f4961c commit cec50fdf118c3af31f72514d33f97adcaa7ac3c5
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 cec50fd

Please sign in to comment.