deckarep / golang-set

A simple, battle-tested and generic set type for the Go language. Trusted by Docker, 1Password, Ethereum and Hashicorp.
Other
4.15k stars 274 forks source link

add Append() method for adding multiple elements to set #93

Closed SignorMercurio closed 1 year ago

SignorMercurio commented 2 years ago

This PR implements Append method and resolves #92 .

Test results:

$ go test -cover
PASS
coverage: 94.8% of statements
ok      github.com/deckarep/golang-set/v2       0.767s
paullesiak commented 2 years ago

~I just switched over to mapset from using a home grown set implementation, and really enjoying mapset. This functionality is the only aspect missing. @deckarep any chance this may be looked at for inclusion?~

Disregard -- I didn't realize that NewSet allowed for variadic values to be specified. Fantastic. Nice work @deckarep!

deckarep commented 2 years ago

I should have some time to look at it later today.

Thanks for the interest!

On Wed, Jul 20, 2022 at 11:47 AM Paul Lesiak @.***> wrote:

I just switched over to mapset from using a home grown set implementation, and really enjoying mapset. This functionality is the only aspect missing. @deckarep https://github.com/deckarep any chance this may be looked at for inclusion?

— Reply to this email directly, view it on GitHub https://github.com/deckarep/golang-set/pull/93#issuecomment-1190632241, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQ73X3W7PSLICKJTNAND3VVBCSPANCNFSM5UADNMSQ . You are receiving this because you were mentioned.Message ID: @.***>

deckarep commented 2 years ago

@SignorMercurio - Hello, looks like this PR has merge conflicts after I merged a few PRs. Do you have any bandwidth to tackle them? I'm still swamped currently but will get to it eventually. I appreciate your contribution!

SignorMercurio commented 2 years ago

@deckarep Sure, I've resolved conflicts now.

deckarep commented 2 years ago

@SignorMercurio - hmm still seeing conflicts unfortunately. I am unable to merge.

SignorMercurio commented 2 years ago

@deckarep I'm not sure why I cannot see the conflicts now:

image

Is there anything I can do to help?

danielchalef commented 1 year ago

@deckarep I'd love to avoid for loops for adding multiple values to a set. Would you have time soon to merge this PR?