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:
parent
0f22991cb6
commit
ea24f0643a
1 changed files with 18 additions and 6 deletions
|
@ -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}}`
|
||||||
|
|
Loading…
Add table
Reference in a new issue