cannot find package “github.com/gorilla/mux” in any of:

后端 未结 6 899
慢半拍i
慢半拍i 2021-02-13 04:15

I use command go get github.com/gorilla/mux. I made http server using Golang, and I run this program :

package main

import (
    \"fmt\"
    \"htm         


        
6条回答
  •  孤独总比滥情好
    2021-02-13 04:35

    I try to remove github.com/gorilla and github.com/peterbourgon directory, then, retry: make, it works.

    fail log:
    
    
    mac@user:~/TempPlace/temp/ngrok% make
    go fmt ngrok/...
    go get github.com/jteeuwen/go-bindata
    GOOS="" GOARCH="" go install github.com/jteeuwen/go-bindata/go-bindata
    bin/go-bindata -nomemcopy -pkg=assets -tags=debug \
    		-debug=true \
    		-o=src/ngrok/client/assets/assets_debug.go \
    		assets/client/...
    go get github.com/jteeuwen/go-bindata
    GOOS="" GOARCH="" go install github.com/jteeuwen/go-bindata/go-bindata
    bin/go-bindata -nomemcopy -pkg=assets -tags=debug \
    		-debug=true \
    		-o=src/ngrok/server/assets/assets_debug.go \
    		assets/server/...
    go get -tags 'debug' -d -v ngrok/...
    src/ngrok/server/config.go:16:2: no Go files in /Users/apple/TempPlace/temp/ngrok/src/github.com/gorilla/mux
    src/ngrok/server/config.go:17:2: no Go files in /Users/apple/TempPlace/temp/ngrok/src/github.com/peterbourgon/diskv
    make: *** [deps] Error 1
    
    
    success log:
    
    
    mac@user:~/TempPlace/temp/ngrok% make
    go fmt ngrok/...
    go get github.com/jteeuwen/go-bindata
    GOOS="" GOARCH="" go install github.com/jteeuwen/go-bindata/go-bindata
    bin/go-bindata -nomemcopy -pkg=assets -tags=debug \
    		-debug=true \
    		-o=src/ngrok/client/assets/assets_debug.go \
    		assets/client/...
    go get github.com/jteeuwen/go-bindata
    GOOS="" GOARCH="" go install github.com/jteeuwen/go-bindata/go-bindata
    bin/go-bindata -nomemcopy -pkg=assets -tags=debug \
    		-debug=true \
    		-o=src/ngrok/server/assets/assets_debug.go \
    		assets/server/...
    go get -tags 'debug' -d -v ngrok/...
    github.com/gorilla/websocket (download)
    github.com/gorilla/mux (download)
    src/ngrok/server/config.go:17:2: no Go files in /Users/apple/TempPlace/temp/ngrok/src/github.com/peterbourgon/diskv
    make: *** [deps] Error 1
    mac@user:~/TempPlace/temp/ngrok% make
    go fmt ngrok/...
    go get github.com/jteeuwen/go-bindata
    GOOS="" GOARCH="" go install github.com/jteeuwen/go-bindata/go-bindata
    bin/go-bindata -nomemcopy -pkg=assets -tags=debug \
    		-debug=true \
    		-o=src/ngrok/client/assets/assets_debug.go \
    		assets/client/...
    go get github.com/jteeuwen/go-bindata
    GOOS="" GOARCH="" go install github.com/jteeuwen/go-bindata/go-bindata
    bin/go-bindata -nomemcopy -pkg=assets -tags=debug \
    		-debug=true \
    		-o=src/ngrok/server/assets/assets_debug.go \
    		assets/server/...
    go get -tags 'debug' -d -v ngrok/...
    github.com/peterbourgon/diskv (download)
    github.com/google/btree (download)
    go install -tags 'debug' ngrok/main/ngrok
    go install -ldflags "-s" -tags 'debug' ngrok/main/ngrokd
    
    

提交回复
热议问题