• 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
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...