Mongo Sharred键定义并在GO lang中使用

I have a program where I need to access Mongo Sharred Key from DB collection in Go lang. I retrieve the collection output as

map[string]interface{} 

and type cast Mongo Sharred Key. However sometime its definition is int64 and sometime it is only int. So my Go program is getting panic sating

"invalid interface conversion - interface is defined as int but its type is int64".

And when I change its definition to int64 again I am getting same type error for other records. Please help.