# Documenting Go Code With Godoc

DevFeed: [Documenting Go Code With Godoc](<https://devfeed.tech/articles/documenting-go-code-with-godoc-22047.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2013/06/documenting-go-code-with-godoc.html>)

Published: 2013-06-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Documentation](<https://devfeed.tech/topics/documentation.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [browser](<https://devfeed.tech/tags/browser.md>), [code](<https://devfeed.tech/tags/code.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [go](<https://devfeed.tech/tags/go.md>), [go-language](<https://devfeed.tech/tags/go-language.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [html](<https://devfeed.tech/tags/html.md>), [programming](<https://devfeed.tech/tags/programming.md>)

## AI overview

This tutorial explains how LiteIDE's integrated Godoc viewer displays documentation generated by the godoc tool for the Go language and custom packages. It describes supported URL schemes, automatic scheme handling, and opening documentation from the file browser.

## Source excerpt

As you know if you read my blog, I have been building a set of new utility packages so I can start developing an application server I need for a new project. I am brand new to Go and the Mac OS. Needless to say it has been one hell of an education over the past month. But I don't miss Windows or C# at all. I made some progress in my coding and wanted to build documentation for the code. I have been using the documentation viewer in LiteIDE and I was hoping to integrate my documentation in there was well. I was really surprised to see see that LiteIDE already had my packages listed inside of their integrated Godoc viewer. So it then begged the question. How is that working? After some digging around I found this local HTML file. If you have LiteIDE installed you can copy the following url into your browser. file:///Applications/LiteIDE.app/Contents/Resources/golangdoc/about.html This is what it shows Overview The integrated Godoc viewer in LiteIDE provides an easy way to browse documentation generated by the godoc tool without leaving the editor. Documentation can be viewed for both the official Go language as well as custom packages. The remainder of this page describes ways to invoke the Godoc viewer. Supported URL Schemes It is possible to view documentation by directly entering a URL into the Godoc viewer's address bar. When doing this, you can specify what type of documentation you are looking for by prefixing the address with one of the following URL schemes: find Searches for packages with a specified string in their name. For example: find:zip find:godoc list Lists all packages in a given directory. The main choices are "pkg" and "cmd", which can be found as links in the header of the page. For example: list:pkg - displays the Golang packages list:cmd - displays the Golang commands pdoc Views documentation for a specified package or command. For example: pdoc:fmt pdoc:archive/zip pdoc:gofmt pdoc:f:/hg/zmq/gozmq file Views a specified HTML, Markdown, or plain-