1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-19 17:55:41 +02:00
tldr/pages/common/godoc.md
Vitor Henrique 46a054215a
pages*: make help and version commands comply with the style guide (#12107)
* pages*: use generic word for help

* git: add newline to the end

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* pages*: make help and version commands comply with the style guide

* java: fix Java name

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2024-01-30 12:55:24 +08:00

499 B

godoc

Show 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}}