Hacker News new | ask | show | jobs
by stevvooe 4802 days ago
> map[rhubarb]bool is how Go does sets

Actually, you should use map[rhubarb]struct{} since a struct{} requires no storage. You can test membership with this:

    _, ok := m[strawberryRhubarb]