golang-set icon indicating copy to clipboard operation
golang-set copied to clipboard

add Append() method for adding multiple elements to set

Open SignorMercurio opened this issue 3 years ago • 6 comments

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

SignorMercurio avatar Apr 21 '22 18:04 SignorMercurio

~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!

paullesiak avatar Jul 20 '22 18:07 paullesiak

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 avatar Jul 21 '22 15:07 deckarep

@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!

deckarep avatar Jul 27 '22 16:07 deckarep

@deckarep Sure, I've resolved conflicts now.

SignorMercurio avatar Jul 28 '22 04:07 SignorMercurio

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

deckarep avatar Jul 29 '22 15:07 deckarep

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

image

Is there anything I can do to help?

SignorMercurio avatar Jul 29 '22 18:07 SignorMercurio

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

danielchalef avatar Dec 23 '22 18:12 danielchalef