title: Golang error i is not a type
body: <p>I have a simple function which takes a variable gets its type and processes it in to a switch but i get an  error :</p>
  
  <p><code>i is not a type</code></p>
  
  <p>My code looks like this:</p>
  
  <pre><code>var whatAmI = func(i, interface{}) { // error is here
      switch t := i.(type) {
      case bool:
          fmt.Println("I'm a bool!")
      case int:
          fmt.Println("I'm an int!")
      default:
          fmt.Println("Don't know type %T\n", t)
      }
  }
  whatAmI(true)
  whatAmI(1)
  whatAmI("hey")
  </code></pre>
  
  <p>Am i misunderstanding something here? </p>