duan89197 2016-06-03 19:09
浏览 21

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.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料