You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. mkdir foo && cd foo
2. curl http://play.golang.org/p/MdnYIPw4Ee.go > foo.go
3. godoc .
What is the expected output?
PACKAGE DOCUMENTATION
package foo
import "."
VARIABLES
var NUC_4 = [][]int{
/* - A C G T */
/* - */ {0, 0, 0, 0, 0},
/* A */ {0, 5, -4, -4, -4},
/* C */ {0, -4, 5, -4, -4},
/* G */ {0, -4, -4, 5, -4},
/* T */ {0, -4, -4, -4, 5},
}
What do you see instead?
PACKAGE DOCUMENTATION
package foo
import "."
VARIABLES
var NUC_4 = [][]int{
{0, 0, 0, 0, 0},
{0, 5, -4, -4, -4},
{0, -4, 5, -4, -4},
{0, -4, -4, 5, -4},
{0, -4, -4, -4, 5},
}
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
Linux
Which version are you using? (run 'go version')
go1.2
go.tools 25a7477727f3
Please provide any additional information below.
The text was updated successfully, but these errors were encountered:
This is a tool bug but godoc is included in the release. Looks like a serious bug,
relatively speaking: godoc shouldn't throw away comments. It's probably easy to fix,
though. Tagging for 1.3.
This is non-trivial to fix: At the moment, godoc shows only comments that are collected
by go/doc; and go/doc only collects comments that are associated with a declaration
(above, or on the same line).
It should be possible to use the newer CommentMap mechanism instead (or in addition),
but that will require quite a bit of re-engineering in go/doc and godoc.
This should be fixed eventually, but before putting in the work, the long-term strategy
of go/ast, go/doc, and friends needs to be worked out first. There are higher-priority
issues for 1.3.
rsc
changed the title
go.tools/cmd/godoc: comments in [][]T are omitted in doc rendering
x/tools/cmd/godoc: comments in [][]T are omitted in doc rendering
Apr 14, 2015
The text was updated successfully, but these errors were encountered: