News for hackers. Stuff that matters.
Re:Deduplicating a Slice in Go by mbnull on Wednesday April 12, 2023 @08:35AM (#35538640)
Yes, sometimes you want to de-duplicate pieces of information by a part of the piece and preserve order. The article tldr sounded like you can only de-duplicating by first sorting with package sort if you don't have to preserve order. However as I just wanted to point out, it works if you have to preserve order just as well.

Edit: I see now that the original article meant preserving output order. And i have not clarified that i meant input order.

There are no comments on this comment yet.