Alias conversions <p>I have <code>struct AccessToken</code> as a part of external library and I use that library in my own. I'd like to return a value of this type but I do not see any reasons why my internal implementation should be visible from outside. Type alias looks great for this.</p> <pre><code>type AccessToken oauth.AccessToken </code></pre> <p>But I'm getting an error when trying to do next:</p> <pre><code>func Auth(key string, secret string) *AccessToken { ... var token oauth.AccessToken = AuthorizeToken(...) return AccessToken(*token) } </code></pre> <p>Error:</p> <pre><code>cannot use AccessToken(*accessToken) (type AccessToken) as type *AccessToken in return argument </code></pre> <p>It's clear that I can just copy structures field by fiend. But is there any way to use aliases?</p>