diff options
| author | mo khan <mo@mokhan.ca> | 2025-05-15 17:08:36 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-05-15 17:08:36 -0600 |
| commit | 77afd54f19a5c7ad4417c4db687e257900b0e6c3 (patch) | |
| tree | 1c41b2e9e5fc3c5eb34c2fe53a6255592de592ca | |
| parent | 1622cea8df335a605ed815c6753cdefe8d2147ad (diff) | |
chore: update golang-set module
| -rw-r--r-- | go.mod | 4 | ||||
| -rw-r--r-- | go.sum | 6 | ||||
| -rw-r--r-- | vendor/github.com/deckarep/golang-set/v2/README.md | 5 | ||||
| -rw-r--r-- | vendor/github.com/deckarep/golang-set/v2/set.go | 14 | ||||
| -rw-r--r-- | vendor/github.com/deckarep/golang-set/v2/threadsafe.go | 13 | ||||
| -rw-r--r-- | vendor/github.com/deckarep/golang-set/v2/threadunsafe.go | 20 | ||||
| -rw-r--r-- | vendor/modules.txt | 2 |
7 files changed, 59 insertions, 5 deletions
@@ -8,6 +8,7 @@ require ( github.com/docker/go-connections v0.5.0 github.com/oauth2-proxy/mockoidc v0.0.0-20240214162133-caebfff84d25 github.com/oklog/ulid v1.3.1 + github.com/playwright-community/playwright-go v0.5200.0 github.com/rs/zerolog v1.34.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 @@ -26,7 +27,7 @@ require ( github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/deckarep/golang-set/v2 v2.7.0 // indirect + github.com/deckarep/golang-set/v2 v2.8.0 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.8.3 // indirect @@ -63,7 +64,6 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/playwright-community/playwright-go v0.5200.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect @@ -26,8 +26,8 @@ github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/deckarep/golang-set/v2 v2.7.0 h1:gIloKvD7yH2oip4VLhsv3JyLLFnC0Y2mlusgcvJYW5k= -github.com/deckarep/golang-set/v2 v2.7.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/deckarep/golang-set/v2 v2.8.0 h1:swm0rlPCmdWn9mESxKOjWk8hXSqoxOp+ZlfuyaAdFlQ= +github.com/deckarep/golang-set/v2 v2.8.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/docker v28.1.1+incompatible h1:49M11BFLsVO1gxY9UX9p/zwkE/rswggs8AdFmXQw51I= @@ -93,6 +93,8 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= diff --git a/vendor/github.com/deckarep/golang-set/v2/README.md b/vendor/github.com/deckarep/golang-set/v2/README.md index bb691b1..e471368 100644 --- a/vendor/github.com/deckarep/golang-set/v2/README.md +++ b/vendor/github.com/deckarep/golang-set/v2/README.md @@ -9,6 +9,11 @@ The missing `generic` set collection for the Go language. Until Go has sets bui ## Psst * Hi there, 👋! Do you use or have interest in the [Zig programming language](https://ziglang.org/) created by Andrew Kelley? If so, the golang-set project has a new sibling project: [ziglang-set](https://github.com/deckarep/ziglang-set)! Come check it out! +## Update 3/14/2025 +* Packaged version: `2.8.0` introduces support for true iterators for Go 1.23+. Please see [issue #141](https://github.com/deckarep/golang-set/issues/141) +for further details on the implications of how iterations work between older Go versions vs newer Go versions. Additionally, this +release has a minor unit-test spelling fix. + ## Update 12/3/2024 * Packaged version: `2.7.0` fixes a long-standing bug with *JSON Unmarshaling*. A large refactor in the interest of performance introduced this bug and there was no way around it but to revert the code back to how it was previously. The performance diff --git a/vendor/github.com/deckarep/golang-set/v2/set.go b/vendor/github.com/deckarep/golang-set/v2/set.go index 292089d..e9409aa 100644 --- a/vendor/github.com/deckarep/golang-set/v2/set.go +++ b/vendor/github.com/deckarep/golang-set/v2/set.go @@ -73,6 +73,10 @@ type Set[T comparable] interface { // given items are in the set. ContainsAny(val ...T) bool + // ContainsAnyElement returns whether at least one of the + // given element are in the set. + ContainsAnyElement(other Set[T]) bool + // Difference returns the difference between this set // and other. The returned set will contain // all elements of this set that are not also @@ -253,3 +257,13 @@ func NewThreadUnsafeSetFromMapKeys[T comparable, V any](val map[T]V) Set[T] { return s } + +// Elements returns an iterator that yields the elements of the set. Starting +// with Go 1.23, users can use a for loop to iterate over it. +func Elements[T comparable](s Set[T]) func(func(element T) bool) { + return func(yield func(element T) bool) { + s.Each(func(t T) bool { + return !yield(t) + }) + } +} diff --git a/vendor/github.com/deckarep/golang-set/v2/threadsafe.go b/vendor/github.com/deckarep/golang-set/v2/threadsafe.go index 93f20c8..664fc61 100644 --- a/vendor/github.com/deckarep/golang-set/v2/threadsafe.go +++ b/vendor/github.com/deckarep/golang-set/v2/threadsafe.go @@ -82,6 +82,19 @@ func (t *threadSafeSet[T]) ContainsAny(v ...T) bool { return ret } +func (t *threadSafeSet[T]) ContainsAnyElement(other Set[T]) bool { + o := other.(*threadSafeSet[T]) + + t.RLock() + o.RLock() + + ret := t.uss.ContainsAnyElement(o.uss) + + t.RUnlock() + o.RUnlock() + return ret +} + func (t *threadSafeSet[T]) IsEmpty() bool { return t.Cardinality() == 0 } diff --git a/vendor/github.com/deckarep/golang-set/v2/threadunsafe.go b/vendor/github.com/deckarep/golang-set/v2/threadunsafe.go index 7e3243b..c95d32b 100644 --- a/vendor/github.com/deckarep/golang-set/v2/threadunsafe.go +++ b/vendor/github.com/deckarep/golang-set/v2/threadunsafe.go @@ -109,6 +109,26 @@ func (s *threadUnsafeSet[T]) ContainsAny(v ...T) bool { return false } +func (s *threadUnsafeSet[T]) ContainsAnyElement(other Set[T]) bool { + o := other.(*threadUnsafeSet[T]) + + // loop over smaller set + if s.Cardinality() < other.Cardinality() { + for elem := range *s { + if o.contains(elem) { + return true + } + } + } else { + for elem := range *o { + if s.contains(elem) { + return true + } + } + } + return false +} + // private version of Contains for a single element v func (s *threadUnsafeSet[T]) contains(v T) (ok bool) { _, ok = (*s)[v] diff --git a/vendor/modules.txt b/vendor/modules.txt index f04cbea..3d0f8be 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -36,7 +36,7 @@ github.com/cpuguy83/dockercfg # github.com/davecgh/go-spew v1.1.1 ## explicit github.com/davecgh/go-spew/spew -# github.com/deckarep/golang-set/v2 v2.7.0 +# github.com/deckarep/golang-set/v2 v2.8.0 ## explicit; go 1.18 github.com/deckarep/golang-set/v2 # github.com/distribution/reference v0.6.0 |
