0

I am new to Go and am writing a test application and would like to document it. My application is in GOHOME\src\myapp.

I could use the following command to start a server and use a browser to view the documents. This worked:

$ godoc -http=":5050"

However, I would like to generate HTML files and copy the files to a server so other people could read them. I tried:

$ godoc myapp -zip="1.zip"

and

$ godoc myapp -zip="1.zip" -index=true

I always get the following error:

No match found.

What should I do so that I can generate all document files?

t j
  • 7,026
  • 12
  • 46
  • 66
George Meng
  • 23
  • 1
  • 4
  • The zip option specifies the file system to serve, not where to write data. If the zip option is not specified, then godoc serves the directory tree $GOPATH. If you are publishing your code publicly to bitbucket, github, etc, then use godoc.org to view your doc. –  Mar 16 '15 at 14:06
  • Thanks for the quick update. So is there any options to generate documents like Javadoc, so we could host on a different server? – George Meng Mar 16 '15 at 14:09
  • 1
    Use [wget](http://www.gnu.org/software/wget/manual/html_node/Recursive-Download.html) to download from `godoc -http=:5050`. – Charlie Tumahai Mar 16 '15 at 14:19

0 Answers0