0

enter image description hereI just import the go-ethereum project in goland. But the configuration shows the error below, how to solve it? goland error

0

go-ethereum uses Go Modules. This means that you can clone the project anywhere in your system and use it from there.

Assuming that you are using a reasonably new version of the IDE, such as 2020.2.2, when a Go Modules based project is opened, it will automatically turn on the support for them. If it's not, for whatever reason, go to Settings/Preferences | Go | Go Modules and enable it.

You can also use the Go Modules based projects from GOPATH itself, but in that case you should manually enable/check that the IDE enabled the Go Modules support for you.

You should also double-check your GOPATH setting to match what you expect it to be in the system, in your case it should be C:\tools and you can check the value under Settings/Preferences | Go | GOPATH. This will ensure that the Go Modules cache is shared between the system (terminal) and the IDE and no extra space is required (or wasted).

Finally, the error is probably due to either the GOPATH not being configured correctly or the Go Modules being turned off. Check those first and proceed from there.

1
  • thank you sir.thank you. – jiebang Sep 12 '20 at 4:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.