登录
首页 >  Golang >  Go问答

How can I generate HTML documents using `godoc`?

来源:Golang技术栈

时间:2023-04-06 20:08:05 201浏览 收藏

本篇文章向大家介绍《How can I generate HTML documents using `godoc`?》,主要包括golang,具有一定的参考价值,需要的朋友可以参考一下。

问题内容

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 achieve it. if anyone could help me, I'll appreciate it.

正确答案

A bit better form can by produced by:

godoc -url "http://localhost:6060/pkg/container/heap/" > page.html 

(I have godoc server running at :6060 and I'm not sure if that's a prerequisite).

The HTML would probably look better if combined with original CSS styles found in the Go repository by adjusting the produced HTML files to properly refer to it.

终于介绍完啦!小伙伴们,这篇关于《How can I generate HTML documents using `godoc`?》的介绍应该让你收获多多了吧!欢迎大家收藏或分享给更多需要学习的朋友吧~golang学习网公众号也会发布Golang相关知识,快来关注吧!

声明:本文转载于:Golang技术栈 如有侵犯,请联系study_golang@163.com删除
相关阅读
更多>
最新阅读
更多>
课程推荐
更多>
评论列表