使用golang和neo4j,使用golang-neo4j-bolt-driver。

huangapple go评论79阅读模式
英文:

golang and neo4j using golang-neo4j-bolt-driver

问题

我正在尝试使用golang-neo4j-bolt-driver包[github.com/johnnadratowski/golang-neo4j-bolt-driver]。

我已经导入了该包,并且正在使用创建新驱动程序的示例方式:

driver := bolt.NewDriver()

我得到了以下错误:

./neo.go:5: 导入但未使用: "github.com/johnnadratowski/golang-neo4j-bolt-driver" 作为 golangNeo4jBoltDriver
./neo.go:34: 未定义: bolt.NewDriver

如果有任何指导,将不胜感激。

英文:

I'm trying out the golang-neo4j-bolt-driver package
github.com/johnnadratowski/golang-neo4j-bolt-driver

I have imported the package and am using the example way of creating a new driver:

driver := bolt.NewDriver()

i get the following:

./neo.go:5: imported and not used: "github.com/johnnadratowski/golang-neo4j-bolt-driver" as golangNeo4jBoltDriver
./neo.go:34: undefined: bolt in bolt.NewDriver

any pointers would be appreciated

答案1

得分: 7

你需要给这个库的名称起一个别名,例如:

bolt "github.com/johnnadratowski/golang-neo4j-bolt-driver"

你可以在他们的代码示例中看到这个用法。

英文:

You will want to alias the name of the library

bolt "github.com/johnnadratowski/golang-neo4j-bolt-driver"

You can see this in their code examples

huangapple
  • 本文由 发表于 2017年3月16日 03:13:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/42818747.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定