英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论