_( Put the version of urfave/cli that you are using here )_
I can't install and go get the package.
When I run, show this error:
go get github.com/urfave/cli/v2
package github.com/urfave/cli/v2: cannot find package "github.com/urfave/cli/v2" in any of:
C:\Go\src\github.com\urfave\cli\v2 (from $GOROOT)
E:\cs\golang\gopath\src\github.com\urfave\cli\v2 (from $GOPATH)
Although I can find these files at %GOPATH%\src\github.com\urfave\cli,
and I use import "github.com/urfave/cli/v2"
show this error:
main.go:10:2: cannot find package "github.com/urfave/cli/v2" in any of:
C:\Go\src\github.com\urfave\cli\v2 (from $GOROOT)
E:\cs\golang\gopath\src\github.com\urfave\cli\v2 (from $GOPATH)
Describe the steps or code required to reproduce the behavior
A clear and concise description of what you expected to happen.
Add any other context about the problem here.
If the issue relates to a specific open source Github repo, please link that repo here.
If you can reproduce this issue with a public CI system, please link a failing build here.
We'd love to have more contributors on this project! If the fix for this bug is easily explained and very small, free free to create a pull request for it.
go env and paste its output hereE:\cs\golang\gopath\src\github.com\cw1997\all2mif\src>go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\changweimbp\AppData\Local\go-build
set GOENV=C:\Users\changweimbp\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=E:\cs\golang\gopath
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\CH
ANGW~1\AppData\Local\Temp\go-build534103886=/tmp/go-build -gno-record-gcc-switches
Very Thanks!!
I think you are using an old version of go that does not support go modules, so you can remove the v2 bit, but ideally you'd update go, as we'll keep breaking you.
@cw1997 to super double confirm, can you run go version and show us the output?
@cw1997 to super double confirm, can you run
go versionand show us the output?
C:\Users\changweimbp>go version
go version go1.13.4 windows/amd64
this is my golang version, but this is the latest version....w(锞熜旓緹)w
@cw1997 I believe what you need to do is change
go get github.com/urfave/cli/v2
to this
GO111MODULE=on go get github.com/urfave/cli/v2
can you try that and report back?
Oh, it run success.
I'm very sorry to bother you and very thank you!!
The last time I used golang was two years ago and that version is go1.10 so I don't know the new feature about 'Go Module'.
Thank you for letting me know about such a useful new feature, ^_^.
Thanks for reporting back!
Apologies for the minor road bump, I think I'll update the documentation to mention GO111MODULE=on 馃攳
@cw1997 I believe what you need to do is change
go get github.com/urfave/cli/v2to this
GO111MODULE=on go get github.com/urfave/cli/v2can you try that and report back?
This is what I am getting. How to resolve this?
'GO111MODULE' is not recognized as an internal or external command,
operable program or batch file.
Most helpful comment
@cw1997 I believe what you need to do is change
to this
can you try that and report back?