Updating golang.org/x/tools

252 views
Skip to first unread message

Tong Sun

unread,
Feb 16, 2020, 6:59:16 PM2/16/20
to golang-nuts
Hi, 

My present from golang.org/x/tools is too old to be functioning properly:

$ present
2020/02/16 18:13:07 Failed to parse templates: template: slides.tmpl:65: function "pagenum" not defined

So I did `go get -v -u golang.org/x/tools`. However, my present is not updated and still giving me above error. 
(`type present` shows it is at $GOPATH/bin/present).

Wouldn't `go get` will install those binaries automatically? Or, how can I do that? (I had to build & cp manually to make my present working)

Here is full log of my `go get`:

$ go get -v -u golang.org/x/tools
Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
get "golang.org/x/tools": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools?go-get=1
go: finding golang.org/x/tools latest
Parsing meta tags from https://golang.org/x/net?go-get=1 (status code 200)
get "golang.org/x/net": found meta tag get.metaImport{Prefix:"golang.org/x/net", VCS:"git", RepoRoot:"https://go.googlesource.com/net"} at https://golang.org/x/net?go-get=1
Parsing meta tags from https://golang.org/x/mod?go-get=1 (status code 200)
get "golang.org/x/mod": found meta tag get.metaImport{Prefix:"golang.org/x/mod", VCS:"git", RepoRoot:"https://go.googlesource.com/mod"} at https://golang.org/x/mod?go-get=1
Parsing meta tags from https://golang.org/x/xerrors?go-get=1 (status code 200)
get "golang.org/x/xerrors": found meta tag get.metaImport{Prefix:"golang.org/x/xerrors", VCS:"git", RepoRoot:"https://go.googlesource.com/xerrors"} at https://golang.org/x/xerrors?go-get=1
go: finding golang.org/x/net v0.0.0-20190620200207-3b0461eec859
go: finding golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898
Parsing meta tags from https://golang.org/x/sync?go-get=1 (status code 200)
get "golang.org/x/sync": found meta tag get.metaImport{Prefix:"golang.org/x/sync", VCS:"git", RepoRoot:"https://go.googlesource.com/sync"} at https://golang.org/x/sync?go-get=1
go: finding golang.org/x/sync v0.0.0-20190423024810-112230192c58
go: finding golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee
Parsing meta tags from https://golang.org/x/text?go-get=1 (status code 200)
get "golang.org/x/text": found meta tag get.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text?go-get=1
Parsing meta tags from https://golang.org/x/sys?go-get=1 (status code 200)
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
get "golang.org/x/sys": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at https://golang.org/x/sys?go-get=1
get "golang.org/x/crypto": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto?go-get=1
go: finding golang.org/x/sync latest
go: finding golang.org/x/xerrors latest
go: finding golang.org/x/net latest
go: finding golang.org/x/sys latest
go: finding golang.org/x/crypto latest
go: finding golang.org/x/mod v0.2.0
go: finding golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
go: finding golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e
go: finding golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7
go: downloading golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2
go: extracting golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2
Parsing meta tags from https://golang.org/x?go-get=1 (status code 200)
Parsing meta tags from https://golang.org?go-get=1 (status code 200)

thanks

anderson...@blacklane.com

unread,
Feb 18, 2020, 3:45:03 AM2/18/20
to golang-nuts
I'm no expert on it. However I'd try `GO111MODULE=on go install ...` outside a Go module. Anyway ensure you run `GO111MODULE=on go get  ...` outside a Go module to get packages to go to your gopath.
Reply all
Reply to author
Forward
0 new messages