]> Cypherpunks repositories - gostls13.git/commit
cmd/doc: make comments inside functions appear with -src
authorRob Pike <r@golang.org>
Thu, 18 Oct 2018 02:46:54 +0000 (13:46 +1100)
committerRob Pike <r@golang.org>
Thu, 18 Oct 2018 04:11:33 +0000 (04:11 +0000)
commite0a97a59286f00b511ecacd1f4011bac348ab60f
treeea189e4e728eaddbb55f07baa63245678c7d7f46
parent415873409770455b526f905fd4b509c651b5b9d9
cmd/doc: make comments inside functions appear with -src

The old godoc didn't do this either, perhaps because it's a little
tricky, but it can be done using a special type from the go/printer
package. (Usually we just use go/format).

Fixes #28195.

Change-Id: Ic6d3df3953ba71128398ceaf9a133c798551b6b8
Reviewed-on: https://go-review.googlesource.com/c/143037
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/doc/doc_test.go
src/cmd/doc/pkg.go