我是 lang 新手,我用 intellij 创建了一个 hello 项目。
现在我想使用外部库。例如:
使用以下命令连接到 aerospike:
http://www.aerospike.com/docs/client/go/examples.html
我不明白的是如何将它导入到解决方案中。我从终端运行命令:
go get github.com/aerospike/aerospike-client-go
Run Code Online (Sandbox Code Playgroud)
但我在项目中没有看到任何结果,也不知道从我的主要方法中使用哪个对象。
你能帮我吗?
该go get命令将依赖项下载到您的 $GOPATH 目录,在构建源代码时,go 编译器可以从该目录访问它。现在您只需按全名导入包import github.com/aerospike/aerospike-client-go