Go: When Using a Map as a Set, What Value?

Say a piece of code wants a Set, not for all a Set’s many operations, just for a membership test, or uniquing a collection of values. Go doesn’t offer a Set natively, but you just use a Map of course, using just the keys to do what you need.

But The Value…

A question comes immediately to mind, if all we care about is the key, what should we use for the…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store