Golang – Github Mux,context.go -> 没有这个文件或目录。

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

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

huangapple
  • 本文由 发表于 2014年6月24日 20:29:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/24386680.html
匿名

发表评论

匿名网友

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

确定