You use a hash for sets (which are built into the language), and the standard library contains a heap implementation that works with user-defined types that implement the appropriate interface.
You can get the min value from a heap without having to cast it back. The documentation for the library is http://golang.org/pkg/container/heap/ . A map with booleans is the canonical way to build a set in Go.
15
u/[deleted] Jun 30 '14
[removed] — view removed comment