How can I generate HTML documents using `godoc`?

后端 未结 4 518
一生所求
一生所求 2021-01-31 01:53

I have written a small go program, and I want to generate standalone HTML documents from source code that can be viewed without godoc server. But I can\'t find any way to achiev

4条回答
  •  佛祖请我去吃肉
    2021-01-31 02:25

    Run the server and get it with wget

    godoc -http=:6060
    

    wait for it to start up then ("container/heap/" with your app):

    wget -p -k http://localhost:6060/pkg/container/heap/
    

    To download all docs I use following:

    wget -m -k -q -erobots=off --no-host-directories --no-use-server-timestamps http://localhost:6060
    

提交回复
热议问题