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
On the following page http://golang.org/pkg/sync/#Pool an unnecessary empty line is added to the code. It's probably because it contains unexported fields an a new line before the public fields, but it would be nice if this empty is not shown. The same happens in the text version of the page: http://golang.org/pkg/sync/?m=text (manual scrolling required).
This is probably a godoc problem, actually. The code looks like this:
typePoolstruct {
local unsafe.Pointer// local fixed-size per-P pool, actual type is [P]poolLocallocalSizeuintptr// size of the local array// New optionally specifies a function to generate// a value when Get would otherwise return nil.// It may not be changed concurrently with calls to Get.Newfunc() interface{}
}
Godoc strips out the non-exported fields but doesn't trim the whitespace separating them.
This is a known problem and non-trivial to fix in general (sometimes we want the whitespace) with the current library support. There may be simple heuristics that might fix the problem in most cases.
robpike
changed the title
go/doc: Unnecessary empty line in type description
x/tools/cmd/godoc: Unnecessary empty line in type description
Oct 25, 2016
On the following page http://golang.org/pkg/sync/#Pool an unnecessary empty line is added to the code. It's probably because it contains unexported fields an a new line before the public fields, but it would be nice if this empty is not shown. The same happens in the text version of the page: http://golang.org/pkg/sync/?m=text (manual scrolling required).
Continued from golang/gddo#243.
The text was updated successfully, but these errors were encountered: