package foo
typeReaderstruct {
InputOffsetint64// Total number of bytes read from underlying io.Reader.OutputOffsetint64// Total number of bytes emitted from Read.hiddenint
}
Currently I see:
$ go doc Reader
type Reader struct {
InputOffset int64 // Total number of bytes read from underlying io.Reader.
OutputOffset int64
// Total number of bytes emitted from Read.
// Has unexported fields.
}
I expect to see:
$ go doc Reader
type Reader struct {
InputOffset int64 // Total number of bytes read from underlying io.Reader.
OutputOffset int64 // Total number of bytes emitted from Read.
// Has unexported fields.
}
On a slightly related note, if you just comment out "hidden", but don't delete it, an extra newline is unnecessarily printed:
$ go doc Reader
type Reader struct {
InputOffset int64 // Total number of bytes read from underlying io.Reader.
OutputOffset int64 // Total number of bytes emitted from Read.
}
The NamePos value was not being set, and would default to a value
of zero. This would cause the printing logic to get confused as
to where exactly to place the "Has unexported fields" string.
A trivial package changes from
<
type A struct {
A int // A
B int
// B
// Has unexported fields.
}
>
to
<
type A struct {
A int // A
B int // B
// Has unexported fields.
}
>
Fixes#12971
Change-Id: I53b7799a1f1c0ad7dcaddff83d9aaeb1d6b7823e
Reviewed-on: https://go-review.googlesource.com/16286
Run-TryBot: Joe Tsai <joetsai@digital-static.net>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Using
go1.5
Consider this Go package:
Currently I see:
I expect to see:
On a slightly related note, if you just comment out "hidden", but don't delete it, an extra newline is unnecessarily printed:
@robpike
The text was updated successfully, but these errors were encountered: