• Rob Pike's avatar
    cmd/doc: add a -src flag to show original source · 294d16c9
    Rob Pike authored
    It's long-desired but was blocked by #26835. That is now fixed, so
    it's easy. When -src is off, we behave as before. But with -src
    set, initialize the go/doc package to preserve the original AST and
    things flow very easily.
    
    With -src, since you're seeing inside the package source anyway it
    shows unexported fields and constants: you see the original source.
    But you still need -u to ask about them.
    
    Fixes #18807
    
    Change-Id: I473e90323b4eff0735360274dc0d2d9dba16ff8b
    Reviewed-on: https://go-review.googlesource.com/c/140959Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
    Run-TryBot: Andrew Gerrand <adg@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    294d16c9
Name
Last commit
Last update
.github Loading commit data...
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...