commit | 3ef68632349c4eab68426d81d981d131b625cafc | [log] [tgz] |
---|---|---|
author | Daniel Martí <mvdan@mvdan.cc> | Fri Dec 28 20:09:56 2018 +0100 |
committer | Daniel Martí <mvdan@mvdan.cc> | Sun Jan 06 17:17:56 2019 +0000 |
tree | 0a20cf7cb6eda56f2dc350cb6088e99ba55ce584 | |
parent | 498d95493402f719ce3de5c8cb60d1b50d0a1239 [diff] |
go/analysis: fix ambiguous paths in structtag pass Now that we support checking for duplicate struct field tags across anonymous struct fields, we must deal with the fact that the files involved in such a warning may not be in the same package or directory. This could lead to errors where a file was mentioned in a package where it didn't exist. Or even worse, point at a location within an existing file that doesn't contain the field we want, causing even further confusion to the user. To fix this, always make the "also at" positions relative to the current warning, if possible. Fixes #29130. Change-Id: Iaa29b406978f1671bdfb2ddddb7058eeffec92a9 Reviewed-on: https://go-review.googlesource.com/c/155899 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com>
This subrepository holds the source for various packages and tools that support the Go programming language.
Some of the tools, godoc
and vet
for example, are included in binary Go distributions.
Others, including the Go guru
and the test coverage tool, can be fetched with go get
.
Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs.
The easiest way to install is to run go get -u golang.org/x/tools/...
. You can also manually git clone the repository to $GOPATH/src/golang.org/x/tools
.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the tools repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/tools/(your subdir):” in the subject line, so it is easy to find.