Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Getting Started: go get won't work any more #221

Closed
march1993 opened this issue Apr 18, 2022 · 4 comments
Closed

Getting Started: go get won't work any more #221

march1993 opened this issue Apr 18, 2022 · 4 comments

Comments

@march1993
Copy link

march1993 commented Apr 18, 2022

$ go get -d github.com/ortuman/jackal
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'.
@SamWhited
Copy link
Collaborator

That means you're not in your project directory. Go to your project directory, make sure it's using modules, then run that again. If you're not familiar with modules, you'll need to do a go mod init mymodule.com/whatever in your project folder first. This tutorial can get you started: https://go.dev/doc/tutorial/create-module

@march1993
Copy link
Author

When I'm in my project directory. Command 'go get' runs successfully. But cd $GOPATH/src/github.com/ortuman/jackal fails since neithor GOPATH nor GOROOT is set.

@SamWhited
Copy link
Collaborator

Ahhh, you're talking about the installation instructions. That wasn't mentioned in your original post. Yes, those are now out of date.

@ortuman
Copy link
Owner

ortuman commented May 27, 2022

Thanks for reporting! The README.md has been properly updated. 🙇‍♂️

@ortuman ortuman closed this as completed May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants