• Joe Tsai's avatar
    cmd/doc: fix strange indentation artifacts with unexported fields · 07d48993
    Joe Tsai authored
    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: 's avatarRob Pike <r@golang.org>
    07d48993
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
newlink Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
trace Loading commit data...
vendor Loading commit data...
vet Loading commit data...
yacc Loading commit data...