Re: [go-nuts] Failed to install golang.org/x/tools

74 views
Skip to first unread message

Wagner Riffel

unread,
Feb 5, 2021, 8:52:47 AM2/5/21
to eric...@arm.com, golang-nuts
On Mon, Feb 1, 2021 at 11:36 PM eric...@arm.com <eric...@arm.com> wrote:
>
> Os: ubuntu 18.04
> Arch: arm64 linux
> go version: go1.15.7
> What did I do:
> $ go get -u golang.org/x/tools/...
> package mvdan.cc/gofumpt/format: unrecognized import path "mvdan.cc/gofumpt/format": reading https://mvdan.cc/gofumpt/format?go-get=1: 404 Not Found
> But with the tip version of Go, I can download and install x/tools successfully. Am I missing any configurations ?
>

I bet it's due go1.15 module-mode be enabled only if you're inside a
go module, and on 1.16 it has changed to be on regardless. see issue
http://golang.org/issues/40276

Perhaps you can get it working on 1.15 with the following: (I didn't
tested, just shooting)
$ cd $(mktemp -d)
$ go mod init tmp
$ GO111MODULE=on go get golang.org/x/tools/...

The temporary module to download is also required on 1.15, but should
not be on tip, I think the issue for that is http://golang.org/issues/40276


BR.

-w
Reply all
Reply to author
Forward
0 new messages