title: How do struct{} and struct{}{} work in Go?
body: <p>I am wondering what does "struct{}" and "struct{}{}" mean in Go? An example is as follows:</p>
  
  <pre><code>array[index] = struct{}{}
  </code></pre>
  
  <p>or</p>
  
  <pre><code>make(map[type]struct{})
  </code></pre>