1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-12 19:35:46 +02:00

go-doc: apply suggestion

Signed-off-by: gonejack <igonejack@gmail.com>
This commit is contained in:
gonejack 2020-05-11 12:02:04 +08:00 committed by Starbeamrainbowlabs
parent 0f22991cb6
commit ea24f0643a
No known key found for this signature in database
GPG key ID: 1BE5172E637709C2

View file

@ -1,12 +1,24 @@
# go doc # go doc
> Tool for showing documentation for package or symbol. > Show documentation for package or symbol.
> More information: <https://golang.org/cmd/go/>. > More information: <https://golang.org/cmd/go/#hdr-Show_documentation_for_package_or_symbol>.
- Show documentation for {{Foo}} in the current package: - Show documentation for current package:
`go doc {{Foo}}` `go doc`
- Show documentation and method summary for {{json.Number}}: - Show package documentation and exported symbols:
`go doc {{json.Number}}` `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}}`