title: Can I alias the return type of a fuction
body: <p>I have a function that returns an anonymous struct. This function is generated and so I cannot change the code or create a type for the return value.</p>
  <pre class="lang-golang prettyprint-override"><code>func foo() struct {
      Prop int
  } {
      result := new(struct {
          Prop int
      })
      result.Prop = 1
      return *result
  }
  </code></pre>
  <p>In other places in the codebase, I want to define a function, <code>bar()</code> that accepts as an argument the return type of <code>foo()</code></p>
  <pre class="lang-golang prettyprint-override"><code>func bar(arg ReturnTypeOfFoo) {
      // ...
  }
  </code></pre>
  <p>Can I do this without manually defining the <code>ReturnTypeOfFoo</code> type? Is there some kind of reflection I can do on <code>foo()</code>?</p>