]> Cypherpunks repositories - gostls13.git/commit
go/doc, godoc: fix range of type declarations
authorRobert Griesemer <gri@golang.org>
Fri, 24 Feb 2012 21:44:22 +0000 (13:44 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 24 Feb 2012 21:44:22 +0000 (13:44 -0800)
commit0a33b703e61c89cc883304eb627826c875aa4bf2
treeb270bef91ab8eb3913e8a6743fa15300de05323f
parentb36d25f1972b9e4d5a8626ed32e3f72d9a58e1b0
go/doc, godoc: fix range of type declarations

For grouped type declarations, go/doc introduces
fake individual declarations. Don't use the original
location of the "type" keyword because it will lead
to an overly large source code range for that fake
declaration, and thus an overly large selection shown
via godoc (e.g.: click on the AssignStmt link for:
http://golang.org/pkg/go/ast/#AssignStmt ).

Also: Don't create a fake declaration if not needed.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5694061
src/pkg/go/doc/reader.go