Go to file
Brad Fitzpatrick ae534bcb6c astutil: fix a comment corruption case
This fixes a case where adding an import when there are is no
existing import declaration can corrupt the position of
comments attached to types. This was the last known
goimports/astutil corruption case.

See golang.org/issue/6884 for more details.

Unfortunately this requires changing the API to add a
*token.FileSet, which we should've had before.  I will update
goimports (the only user of this API?) immediately after
submitting this.

This CL also contains a hack (used only in this case of no
imports): rather than fix the comment positions by hand
(something that only Robert might know how to do), it instead
just prints the AST, manipulates the source, and re-parses
the AST. We can fix up later.

Fixes golang/go#6884

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/38270043
2013-12-16 14:43:29 -08:00
astutil astutil: fix a comment corruption case 2013-12-16 14:43:29 -08:00
blog go.tools/blog: strip prefix when serving static content 2013-11-08 13:28:32 +11:00
call go.tools/pointer: use new callgraph API. 2013-09-25 17:17:42 -04:00
cmd godoc: limit concurrency to local disk filesystem 2013-12-16 11:25:50 -08:00
cover go.tools/cover: split parsing code out from cmd/cover 2013-12-03 20:55:21 -08:00
dashboard go.tools/dashboard/builder: do not fatal on subrepo fetch errors 2013-12-11 23:47:31 +11:00
go go.tools/go/importer: simplified exporter/importer 2013-12-16 14:28:17 -08:00
godoc godoc: limit concurrency to local disk filesystem 2013-12-16 11:25:50 -08:00
importer go.tools/oracle: improvements to command set and performance. 2013-12-13 10:04:55 -05:00
oracle go.tools/oracle: implements: now shows whole-program implements relation for selected type. 2013-12-13 18:00:55 -05:00
playground go.tools/present: add support for non Go code execution 2013-10-14 14:14:08 -07:00
pointer go.tools/oracle: improvements to command set and performance. 2013-12-13 10:04:55 -05:00
present go.tools/present: add Raw content to Code for new go-tour. 2013-11-26 10:04:08 +01:00
ssa ssa: Update the location of the ssadump command in an example comment. 2013-12-16 10:05:40 -05:00
.hgignore go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
AUTHORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
CONTRIBUTORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
LICENSE LICENSE: add 2012-03-17 15:20:58 +11:00
PATENTS go.empty: add PATENTS file to the subrepo. 2012-04-16 11:24:04 +10:00
README go.tools/README: minor correction. 2013-10-29 13:20:58 -04:00
codereview.cfg go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00

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.