Golang - Github Mux, context.go -> 没有这样的文件或目录

标签 go mux

我想用 (go get github.com/gorilla/mux) 安装 Mux 包,但我总是收到错误消息

# github.com/gorilla/context
open go/src/github.com/gorilla/context/context.go: No such file or directory

我自己创建了目录 github.com、gorilla 和 context。但是我没有 context.go 文件....我该如何修复它?

最佳答案

只需使用 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

关于Golang - Github Mux, context.go -> 没有这样的文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24386680/

相关文章:

http - 在 golang 中将管道读取写入 http 响应

go - 嵌套的 Gorilla Mux 路由器不工作

arrays - 在 Golang 中创建此 JSON 对象的最佳方法

generics - 使用泛型的通用 MUX 和 DEMUX

go - 这是基于消息总线的发布-订阅模式吗?

python - 在 golang 程序中运行的 Azure get-credentials 错误

go - 如何在 golang 中使用 mux 和 gorm 发布 body raw?

jquery - Gorilla Mux Google Cloud 端点 CORS 问题

go - 为什么指针取消引用是 slice 中的不同对象

regex - 如何在不编译每个表达式的情况下从正则表达式中提取不同的变量