Quickstart installation
GhoulKingR opened this issue · 2 comments
I recently updated to go1.20.5
, and in installing the framework with the command in this guide, I got this error:
go: go.mod file not found in current directory or any parent directory.
'go get' is no longer supported outside a module.
To build and install a command, use 'go install' with a version,
like 'go install example.com/cmd@latest'
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
I don't know if this only applies to this version of GO, but it'll be nice to add this new information for better quality.
Edit: I returned to read this issue and noticed it may be confusing. For context, the guide is here: https://gin-gonic.com/docs/quickstart/
I ran into this issue on the first step. And I have a pull request that attempts to clarify prevent more users like me from running into the issue: #232
hey bro, my version is 1.20.6, when i run go get -u github.com/gin-gonic/gin
in terminal, and it run well.
Maybe you doesn't run the command under a go module.
mkdir go_demo && cd go_demo && go mod init go_demo
go get -u github.com/gin-gonic/gin
I recently updated to
go1.20.5
, and in installing the framework with the command in this guide, I got this error:go: go.mod file not found in current directory or any parent directory. 'go get' is no longer supported outside a module. To build and install a command, use 'go install' with a version, like 'go install example.com/cmd@latest' For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'.
I don't know if this only applies to this version of GO, but it'll be nice to add this new information for better quality.
Thanks, it works better now.
I'm not as experienced in go, so I didn't know to do that. I also don't know if that's something everyone knows or maybe something to add to the pull request.
Would it be okay to add that to the pull request?