【问题标题】:Golang - Github Mux, context.go -> No such file or directoryGolang - Github Mux, context.go -> 没有这样的文件或目录
【发布时间】:2014-08-14 17:14:36
【问题描述】:

我想用 (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 文件....我该如何解决?

【问题讨论】:

  • 我在周末犯了同样的错误。设置 $GOPATH 后,您不应自己创建任何包目录。 Go 为你做这件事。

标签: go mux


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2015-05-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-09
    • 1970-01-01
    • 2021-06-24
    • 1970-01-01
    相关资源
    最近更新 更多