From 2fd451dbf5db2dd3acf4887c04d617feb2154b9d Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Tue, 14 Feb 2023 22:35:24 -0800 Subject: [PATCH] Drop external atomic dependency (#72) Now that this package only supports Go 1.19 and 1.20, it can make use of the atomic.Bool [1] added in Go 1.19. [1] https://pkg.go.dev/sync/atomic#Bool This has the effect of eliminating any external dependencies from this package -- minus testify, which is only used for testing. --- error.go | 3 +-- go.mod | 5 +---- go.sum | 3 --- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/error.go b/error.go index 0166a2f..4ee4b9f 100644 --- a/error.go +++ b/error.go @@ -146,8 +146,7 @@ import ( "io" "strings" "sync" - - "go.uber.org/atomic" + "sync/atomic" ) var ( diff --git a/go.mod b/go.mod index 6326aa4..1b4e0f5 100644 --- a/go.mod +++ b/go.mod @@ -2,10 +2,7 @@ module go.uber.org/multierr go 1.19 -require ( - github.com/stretchr/testify v1.7.0 - go.uber.org/atomic v1.7.0 -) +require github.com/stretchr/testify v1.7.0 require ( github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/go.sum b/go.sum index 16975ef..e43413c 100644 --- a/go.sum +++ b/go.sum @@ -4,11 +4,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs 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/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=