Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quickstart installation #231

Open
GhoulKingR opened this issue Jun 16, 2023 · 2 comments
Open

Quickstart installation #231

GhoulKingR opened this issue Jun 16, 2023 · 2 comments

Comments

@GhoulKingR
Copy link

GhoulKingR commented Jun 16, 2023

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

@custs21113
Copy link

custs21113 commented Jul 23, 2023

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.
image

  1. mkdir go_demo && cd go_demo && go mod init go_demo
  2. 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.

@GhoulKingR
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants