mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-10 10:35:48 +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
|
||||
|
||||
> Tool for showing documentation for package or symbol.
|
||||
> More information: <https://golang.org/cmd/go/>.
|
||||
> Show documentation for package or symbol.
|
||||
> 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