This commit is contained in:
jackyin 2025-06-20 15:32:00 -04:00 committed by GitHub
commit c62d597b96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 20 deletions

View File

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