title: Set of structs in Go
body: <p>If I have a number of structs that I want to store:</p>
  
  <pre><code>type Stuff struct {
      a string
      b string
  }
  </code></pre>
  
  <p>I can do it with a slice, but it seems like it would use less memory to use a proper set structure.</p>
  
  <p>Unfortunately Go doesn't have a set structure. Everyone recommends using <code>map[Stuff]struct{}</code> but that doesn't work because <code>Stuff</code> is a struct. Anyone have any good solutions? Ideally without having to download a library.</p>