ref: 2cdcf005e5ca9fc38aa4e86cf73fcb23be85b804 adnano.co/content/2022-07-16-gddo.md -rw-r--r-- 1.5 KiB
2cdcf005Adnan Maolood Reading Go documentation with gddo 2 months ago

#title: Reading Go documentation with gddo

Today, I am pleased to announce the release of version 1.6 of gddo, the software powering godocs.io. For those unaware, gddo is a maintained fork of the software which powered the now-defunct godoc.org. It runs as a web server and serves documentation for Go packages.

This release focuses on improving the local documentation viewing experience. gddo now supports serving documentation for modules in the current directory, allowing you to preview documentation while making changes locally. This makes gddo a good replacement for the now-deprecated godoc tool, and a lightweight alternative to the pkgsite command.

To view documentation locally, simply run:

cd my-module
gddo --http :8080

Then navigate your web browser to http://localhost:8080 to view the documentation for your module.

Screenshot of gddo being used to view its own documentation

gddo will also serve documentation for your local copy of the standard library, as well as any modules you have downloaded in your Go module cache, allowing you to easily view the documentation for your dependencies.

gddo is still not a complete replacement for the godoc tool. If you are missing a feature from godoc and want to implement it for gddo, patches are welcome!