Passing in a type variable into function
<p>I'm trying to achieve a type assertion by passing in a type into a function. In other words, I'm trying to achieve something like this:</p>

<pre><code>// Note that this is pseudocode, because Type isn't the valid thing to use here
func myfunction(mystring string, mytype Type) {
    ...

    someInterface := translate(mystring)
    object, ok := someInterface.(mytype)

    ...  // Do other stuff
}

func main() {
    // What I want the function to be like
    myfunction("hello world", map[string]string)
}
</code></pre>

<p>What's the proper function declaration I need to use in <code>myfunction</code>, to successfully perform the type assertion in <code>myfunction</code>?</p>