go 1.18 (currently in beta) breaks install
See original GitHub issueMy system golang is running a beta version of golang 1.18, and I’m seeing the following error when trying to open a golang file:
[coc.nvim] Error: Command failed: env GOBIN="/usr/local/google/home/juliankatz/.config/coc/extensions/coc-go-data/bin" go get golang.org/x/tools/gopls@latest
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'.
It looks like your code should cover this problem, but perhaps I’m hitting an edge case in the regular expression. My go version
output is:
❯ go version
go version go1.18-pre10 ab/123456789 +12345678ab linux/amd64
I’ve changed some information to not include proprietary info.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Go 1.18 Release Notes - The Go Programming Language
Introduction to Go 1.18. The latest Go release, version 1.18, is a significant release, including changes to the language, implementation of the toolchain, ......
Read more >Announcing Go 1.18 Beta 2 - The Go Programming Language
We released Go 1.18 beta 1 two months ago, and it is now the most downloaded Go beta ever, with twice as many...
Read more >Go 1.18 will break the go get in our Makefiles #5481 - GitHub
When we start supporting 1.18, we'll need those Makefile templates to change over to use go install instead of go get .
Read more >Go 1.18 Beta 1 is available, with generics | Hacker News
A big caveat in comparing OCaml and Go would be multicore support, but it's coming in OCaml, without breaking existing programs and with...
Read more >Daniel Martí on Twitter: "Here's a list of some changes to look ...
Here's a list of some changes to look forward to in #golang 1.18! The first beta ... Native Go fuzzing is now ready...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
just simply modify the go install command in
tools.js
file.note. I found that my local file is older than the repository version, though it’s v1.1
Another workaround is to install
gopls
with: