We want to make an if look like two blocks and have the coverage report for the else block decorate the "else" keyword with the right color. To do this, we adjust the apparent starting point of the else block to include the "else". The previous code assumed the way to do this was to move the width of "else " backwards from the else block's opening brace, but that assumes there is a space there. Instead, we now just start the else block exactly at the end of the if block. Simpler, cleaner, and fixes a bug. Fixes golang/go#8557. LGTM=gri R=gri CC=golang-codereviews https://golang.org/cl/127620043 |
||
|---|---|---|
| astutil | ||
| blog | ||
| cmd | ||
| container/intsets | ||
| cover | ||
| dashboard | ||
| go | ||
| godoc | ||
| imports | ||
| oracle | ||
| playground | ||
| present | ||
| refactor | ||
| .hgignore | ||
| AUTHORS | ||
| CONTRIBUTORS | ||
| LICENSE | ||
| PATENTS | ||
| README | ||
| codereview.cfg | ||
README
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 oracle 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. To submit changes to this repository, see http://golang.org/doc/contribute.html.