27

Golang标准库CHM格式文档

 3 years ago
source link: https://studygolang.com/articles/30440
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

![在这里插入图片描述](https://img-blog.csdnimg.cn/20200828164558320.jpg?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3NpbmF0XzM3MzI4NTY5,size_16,color_FFFFFF,t_70#pic_center)    上手Go后,想熟悉golang标准库来做一些项目。在学习和使用golang标准库的时候,发现golang标准库文档不太友好。主要是导航区域和内容区域无法同屏浏览,在包和包间、包内不同对象间来回切换的时候效率比较低下。在官网上也没找到像MSDN和Python Manuals这样的CHM格式库文档。   于是有了下面这个项目:爬取golang官方标准库文档生成CHM格式的电子书。   **1、主要解决的问题:** - 通过CHM格式的导航面板来展示包的层次关系,使包的从属关系一目了然 - 导航面板实现,导航页和内容面的同屏浏览,提高包间,和包内对象来回切换的效率 - 索引面板可以通过关键字来快速定位相关内容   **2、一些考虑:** - python用于原型建模、开发demo的效率实在太高了,所以并没有采用golang来实现 - 官方标准库文档并没有特别宏大,python性能足够了,实际运行5分钟左右完成爬取和生成 - python的interactive模式太方便了,可以边开发,边验证 爬了本地的,大概1分钟吧,Demo视频: https://zhuanlan.zhihu.com/p/200777706   **3、生成效果:**   ![在这里插入图片描述](https://img-blog.csdnimg.cn/20200828164924767.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3NpbmF0XzM3MzI4NTY5,size_16,color_FFFFFF,t_70#pic_center)     **项目链接:如果觉得对你有帮助,请帮忙在github上标星。**   https://github.com/stash11-dev/gochm    

有疑问加站长微信联系

iiUfA3j.png!mobile

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK