Golang reflect, how to get map value type?
<p>For a map <code>m</code> in golang, we can get simply the key type using <code>t.Key()</code>.</p>

<p>But I wonder how to get the map value type? </p>

<p>When the map is empty, we can not even use <code>v.MapIndex</code>, any idea?</p>

<pre><code>m := map[string]int{}
t := reflect.TypeOf(m)
v := reflect.ValueOf(m)
t.Key()
v.MapIndex()
</code></pre>