title: Can I compare variable types with .(type) in Golang?
body: <p>I'm quite confused about the .(type) syntax for interface variables. Is it possible to use it like this:</p>
  
  <pre><code>var a,b interface{}
  // some code
  if first.(type) == second.(type) {
  }
  </code></pre>
  
  <p>or is reflect.TypeOf() the only option to check if the underlying types of a and b are the same type? What comparison am I making in the code above?</p>