英文:
Golang - Github Mux, context.go -> No such file or directory
问题
我想安装Mux包(go get github.com/gorilla/mux
),但我总是收到错误消息:
# github.com/gorilla/context
打开go/src/github.com/gorilla/context/context.go:没有该文件或目录
我已经自己创建了github.com、gorilla和context目录。但是我没有context.go文件...我该如何解决这个问题?
英文:
I want to install the Mux package with (go get github.com/gorilla/mux
) but I always get the errormessage
# github.com/gorilla/context
open go/src/github.com/gorilla/context/context.go: No such file or directory
I have created the directories github.com, gorilla and context on my own. But I have no context.go file.... how can I fix it?
答案1
得分: 6
只需使用go get
命令进行安装:
$ go get github.com/gorilla/context
$ cd $GOPATH/src/github.com/gorilla/context/
~/go/src/github.com/gorilla/context$ ls
context.go context_test.go doc.go LICENSE README.md
英文:
Just install it with go get
:
$ go get github.com/gorilla/context
$ cd $GOPATH/src/github.com/gorilla/context/
~/go/src/github.com/gorilla/context$ ls
context.go context_test.go doc.go LICENSE README.md
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论