mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-16 11:00:21 +00:00
Update cheatsheets
This commit is contained in:
29
godoc
Normal file
29
godoc
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# godoc
|
||||
|
||||
> View documentation for go packages.
|
||||
> More information: <https://godoc.org/>.
|
||||
|
||||
- Display help for a specific package:
|
||||
|
||||
`godoc {{fmt}}`
|
||||
|
||||
- Display help for the function "Printf" of "fmt" package:
|
||||
|
||||
`godoc {{fmt}} {{Printf}}`
|
||||
|
||||
- Serve documentation as a web server on port 6060:
|
||||
|
||||
`godoc -http=:{{6060}}`
|
||||
|
||||
- Create an index file:
|
||||
|
||||
`godoc -write_index -index_files={{path/to/file}}`
|
||||
|
||||
- Use the given index file to search the docs:
|
||||
|
||||
`godoc -http=:{{6060}} -index -index_files={{path/to/file}}`
|
||||
Reference in New Issue
Block a user