mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-11 02:58:26 +00:00
Update cheatsheets
This commit is contained in:
29
go-doc
Normal file
29
go-doc
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# go doc
|
||||
|
||||
> View documentation for a package or symbol.
|
||||
> More information: <https://golang.org/cmd/go/#hdr-Show_documentation_for_package_or_symbol>.
|
||||
|
||||
- View 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}}`
|
||||
Reference in New Issue
Block a user