R
R
Roman2019-10-29 15:29:28
go
Roman, 2019-10-29 15:29:28

"go: cannot use [email protected] syntax in GOPATH mode" - what to do?

I'm trying to run an example: https://iris-go.com/start/ I enter it into the console (Win 7 CMD)
go get github.com/kataras/iris/[email protected]
it writes to me:
go: cannot use [email protected] syntax in GOPATH mode
I did not find a solution by googling.
What needs to be done to get it right?
Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
RidgeA, 2019-10-29
@RidgeA

What version of go?
Yes, and about iris - it is not recommended to use it: https://www.reddit.com/r/golang/comments/b481q7/a_... (well, you can find a lot of this)

F
falconandy, 2019-10-29
@falconandy

1. Create a folder outside GOPATH (by default it is C:\Users\Roman\go) - not C:\Users\Roman\go\src\irisexp, but for example C:\Users\Roman\irisexp
2. inside the folder: go mod init irisexp
3. now go get github.com/kataras/iris/[email protected] should work

U
uvelichitel, 2019-10-29
@uvelichitel

Try
https://github.com/golang/go/wiki/Modules

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question