2015-08-03 18:23
浏览 110


I try to connect to SQL server in golang, I searched in internet and through this address: I understood that first I need to install a package for the purpose, but when I want to install this package through git terminal by entering this command:

$ go get

I receive this error :

can't load package: package no buildable go source files in C:\Go\src\\dnisenkom\go-mssqldb

my $GOPATH is already set.I don't know how to fix this problem ...

图片转代码服务由CSDN问答提供 功能建议

我尝试在golang中连接到SQL Server,我在互联网上搜索并通过以下地址进行搜索: 我了解,首先我需要为此安装一个软件包 ,但是当我想通过输入以下命令通过git终端安装该软件包时:

$ go get


无法加载包:包\ Go \ src \ github.com中没有可生成的go源文件 \ dnisenkom \ go-mssqldb

我的$ GOPATH已设置。我不知道如何解决此问题...

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

  • douwei3280 2015-08-03 20:24

    According to the golang website:

    Get downloads and installs the packages named by the import paths, along with their dependencies.

    It sounds like the download isn't working, which is causing the folder to be empty. One alternative is to download the driver as a zip file and run go install on the folder.

    解决 无用
    打赏 举报

相关推荐 更多相似问题