在Go语言中使用MsSQL数据库的时候需要用到"github.com/denisenkom/go-mssqldb"包,但是在get的时候会报无法下载“cloud.google.com/go/civil”的错误。作为一个良民是不翻墙的,在网上查知“cloud.google.com/go/civil”在github上也是有的,地址是:https://github.com/googleapis/google-cloud-go。直接把这个包get下来。编译的时候"github.com/denisenkom/go-mssqldb"会报错误,说缺少“cloud.google.com/go/civil”,双击错误信息就会导航到加载“cloud.google.com/go/civil”的地方,把这里替换成"github.com/googleapis/google-cloud-go/civil"即可。
参考文献:
https://segmentfault.com/q/1010000015282732/a-1020000015283767