This commit is contained in:
yincong 2025-06-13 17:00:40 +08:00
parent 9149876112
commit 5ee0d1795a
No known key found for this signature in database
GPG Key ID: D37F4B83EDFE5B0F
1 changed files with 10 additions and 16 deletions

View File

@ -108,26 +108,20 @@ Examples:
cd go/src/encoding/json; go doc decode
Flags:
-C dir
change to dir before running command
-all
Show all the documentation for the package.
-c
Respect case when matching symbols.
show all documentation for package
-c symbol matching honors case (paths not affected)
-cmd
Treat a command (package main) like a regular package.
Otherwise package main's exported symbols are hidden
when showing the package's top-level documentation.
show symbols with package docs even if package is a command
-http
serve HTML docs over HTTP
-short
One-line representation for each symbol.
one-line representation for each symbol
-src
Show the full source code for the symbol. This will
display the full Go source of its declaration and
definition, such as a function definition (including
the body), type declaration or enclosing const
block. The output may therefore include unexported
details.
-u
Show documentation for unexported as well as exported
symbols, methods, and fields.
show source code for symbol
-u show unexported symbols as well as exported
`,
}