1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-24 01:02:09 +02:00
tldr/pages/common/godoc.md
Lucas Gabriel Schneider a5fe31bc47
multiple pages: format technical tokens (#5119)
Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com>
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2021-01-31 12:05:18 -05:00

24 lines
494 B
Markdown

# godoc
> Show documentation for go packages.
> More information: <https://godoc.org/>.
- Display help for package "fmt":
`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}}`