title: How can I test that the return value from a function in go is a pointer to a type?
body: <p>I have highlighted in the test case where I expect something should go. Ideally I would like to test that <code>i</code> is an instance of <code>WHAT_SHOULD_I_PUT_HERE</code> </p>
  
  <p>main.go</p>
  
  <pre><code>package main
  
  import "fmt"
  
  type SomeType struct {
      thingThatNeedsSetup struct{}
  }
  
  func Create() *SomeType {
      return &amp;SomeType{}
  }
  
  func main() {
      a := Create()
      fmt.Println(a.thingThatNeedsSetup)
  }
  </code></pre>
  
  <p>main_test.go</p>
  
  <pre><code>package main
  
  import (
      "testing"
  )
  
  func TestCreate(t *testing.T) {
  
      i := Create()
  
      if i != WHAT_SHOULD_I_PUT_HERE {
          t.Error()
      }   
  }
  </code></pre>