The Type.Elem method gets you that.

https://play.golang.org/p/ercS5yo3jm3

On Thu, 2018-08-30 at 18:06 -0500, Mark Volkmann wrote:
> I see that I can use the `reflect` package to get the key type of a
> map
> like this:
> 
> ```go
> mt := reflect.TypeOf(myMap)
> fmt.Println("key type is", mt.Key())
> ```
> 
> But I don't see a way to get the value type of a map. Is there a
> method to
> do this?
> 
> -- 
> R. Mark Volkmann
> Object Computing, Inc.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to