From 6f4e9257c3287acffd79f9d6ccb6b6b14b1c16c0 Mon Sep 17 00:00:00 2001 From: Mikel Olasagasti Uranga Date: Wed, 11 Sep 2024 15:17:39 +0200 Subject: [PATCH] Chore: switch to google's uuid module Also change import order to make `gofumpt` happy. Signed-off-by: Mikel Olasagasti Uranga --- CHANGELOG.md | 3 +++ go/go.mod | 2 +- go/go.sum | 8 ++------ go/id_generator.go | 5 +++-- go/messages_test.go | 3 ++- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 414ee8e7..54b876da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Changed +- [Go] Switch to Google's UUID module ([#251](https://github.com/cucumber/messages/pull/251) + ## [26.0.0] - 2024-08-15 ### Added - [Dotnet] Added support classes aligned with what is provided for the Java implementation (https://github.com/cucumber/messages/pull/233 [clrudolphi](https://github.com/clrudolphi)) diff --git a/go/go.mod b/go/go.mod index a5f1e2e3..cc543d7e 100644 --- a/go/go.mod +++ b/go/go.mod @@ -1,7 +1,7 @@ module github.com/cucumber/messages/go/v26 require ( - github.com/gofrs/uuid v4.4.0+incompatible + github.com/google/uuid v1.6.0 github.com/stretchr/testify v1.9.0 ) diff --git a/go/go.sum b/go/go.sum index 8767fd9b..56975393 100644 --- a/go/go.sum +++ b/go/go.sum @@ -1,13 +1,9 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gofrs/uuid v4.3.1+incompatible h1:0/KbAdpx3UXAx1kEOWHJeOkpbgRFGHVgv+CFIY7dBJI= -github.com/gofrs/uuid v4.3.1+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= diff --git a/go/id_generator.go b/go/id_generator.go index a721f978..e884e7fe 100644 --- a/go/id_generator.go +++ b/go/id_generator.go @@ -1,8 +1,9 @@ package messages import ( - "github.com/gofrs/uuid" "strconv" + + "github.com/google/uuid" ) type IdGenerator interface { @@ -24,5 +25,5 @@ type UUID struct { } func (i UUID) NewId() string { - return uuid.Must(uuid.NewV4()).String() + return uuid.New().String() } diff --git a/go/messages_test.go b/go/messages_test.go index 57783dc0..38597e03 100644 --- a/go/messages_test.go +++ b/go/messages_test.go @@ -3,8 +3,9 @@ package messages import ( "bytes" "encoding/json" - "github.com/stretchr/testify/require" "testing" + + "github.com/stretchr/testify/require" ) func TestMessages(t *testing.T) {