commit | 115b454b568d24487ae4df4b53b99698a42c52dd | [log] [tgz] |
---|---|---|
author | Damien Neil <dneil@google.com> | Wed Aug 04 10:23:15 2021 -0700 |
committer | Damien Neil <dneil@google.com> | Thu Apr 28 23:10:42 2022 +0000 |
tree | d22020022cff5427ef69998b1c6e62b4f02f03cf | |
parent | 60b4456604b287bbe0b6c9bbe85f09adf1a597cc [diff] |
go/analysis/passes/errorsas: warn if errors.As target is *error Passing an *error as the second parameter to errors.As always matches, making this test: var e error if errors.As(err, &e) { ... } equivalent to: e := err if err != nil { ... } Warn when the second parameter to errors.As has type *error. Fixes golang/go#47528. Change-Id: Ia0e25003493f3b349ab500f0b4d08c2acf88b328 Reviewed-on: https://go-review.googlesource.com/c/tools/+/339889 Reviewed-by: Tim King <taking@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Damien Neil <dneil@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Bryan Mills <bcmills@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 install
.
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 install golang.org/x/tools/...@latest
.
This repository uses prettier to format JS and CSS files.
The version of prettier
used is 1.18.2.
It is encouraged that all JS and CSS code be run through this before submitting a change. However, it is not a strict requirement enforced by CI.
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.