在golang中找到自定义类型的基础类型

type M map[string]interface{}
var item M
fmt.Println(reflect.TypeOf(item))

returns main.M.

How can I find underlying type of item as map[string]interface{}.

Yes, you can fetch the precise structure of the type, if that's what you mean with "root type":

var item M
t := reflect.TypeOf(item)
fmt.Println(t.Kind()) // map
fmt.Println(t.Key())  // string
fmt.Println(t.Elem()) // interface {}

test it

From there you're free to display it as you want.

I don't think there's an out-of-the-box way, but you can construct the underlying type by hand:

type M map[string]interface{}
...
var m M
t := reflect.TypeOf(m)
if t.Kind() == reflect.Map {
    mapT := reflect.MapOf(t.Key(), t.Elem())
    fmt.Println(mapT)
}