1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 21:42:08 +02:00
tldr/pages/common/go-doc.md
会有猫的 4cac843cae
go-*: apply additional suggestions
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2020-05-21 12:33:55 +01:00

24 lines
492 B
Markdown

# go doc
> Show documentation for a package or symbol.
> More information: <https://golang.org/cmd/go/#hdr-Show_documentation_for_package_or_symbol>.
- Show documentation for the current package:
`go doc`
- Show package documentation and exported symbols:
`go doc {{encoding/json}}`
- Show also documentation of symbols:
`go doc -all {{encoding/json}}`
- Show also sources:
`go doc -all -src {{encoding/json}}`
- Show a specific symbol:
`go doc -all -src {{encoding/json.Number}}`