UUID without dependencies in Go
📅
Fri, Aug 26, 2016
⏱️
One-minute read
Today I saw that the size of my vendor/
folder in Golang project is around 150M. I am using glide
there and there are 24 dependencies (it’s a program with multiple data storage connectors, notifications, etc.), so I decided to review it and reduce the amount of 3rd party libraries.
First of all I have checked glide-report
and removed 2 unused packages. Then I noticed gouuid and decided to re-implement it internally.
|
|
Let’s run it:
|
|
I am satisfied of this result, though it’s a pseudo-uuid. Also benchmark result of this solution wins 3rd party dependency.
Think twice before go get
!