Questions tagged [godoc]

GoDoc hosts documentation for Go packages on Bitbucket, GitHub, Google Project Hosting and Launchpad. It can extract and generate documentation for Go programs.

Godoc extracts and generates documentation for Go programs.

Godoc parses Go source code - including comments - and produces documentation as HTML or plain text. The end result is documentation tightly coupled with the code it documents. For example, through godoc's web interface you can navigate from a function's documentation to its implementation with one click.

It has two modes.

Without the -http flag, it runs in command-line mode and prints plain text documentation to standard output and exits. If both a library package and a command with the same name exists, using the prefix cmd/ will force documentation on the command rather than the library package. If the -srcflag is specified, godoc prints the exported interface of a package in Go source form, or the implementation of a specific exported language entity.

References :

http://godoc.org/golang.org/x/tools/cmd/godoc

81 questions
-1
votes
1 answer

Running "go doc" results in "no such tool" error

I've run into a very strange issue, and even though I'm sure the solution is simple, but I can't find anything online about this. Trying to use go doc for any set of arguments always results in the error: go tool: no such tool…
rookie1024
  • 612
  • 7
  • 18
-1
votes
1 answer

How to create document with godoc?

I create simple go with comment in the application to the function and the package I tried godoc -html and my application and the result