/debug/requests is already registered. You may have two independent copies of golang.org/x/net/trace in your binary, trying to maintain separate state. This may involve a vendored copy of golang.org/x

找到问题就很好解决了,直接百度  go依赖管理-govendor

进入项目中,govendor init初始化一下,程序会自动生成一个vendor目录

最重要的一步来了   govendor add +external

使用这个会把你所需要的包全部放入刚才的vendor目录中

这个时候你go build 运行程序就不会发生panic了!!

原文地址:https://www.cnblogs.com/mafeng/p/10782835.html