Skip to content

abhinav/asciidoctor-godoc

Repository files navigation

asciidoctor-godoc

Gem Version

An asciidoctor extension that adds support for a godoc macro. The macro allows you to reference types and functions in a Go package by name, and links to their documentation on pkg.go.dev.

For example, given the following:

Input
The godoc:http[] package provides
godoc:net/http#ServeMux[] for request routing.
Register zero or more godoc:net/http#Handler[handlers] against it,
and specify it as a godoc:net/http#Server.Handler[]
in your server's configuration.
Output

The {url-godoc}/http[http] package provides {url-godoc}/net/http#ServeMux[http.ServeMux] for request routing. Register zero or more {url-godoc}/net/http#Handler[handlers] against it, and specify it as a {url-godoc}/net/http#Server.Handler[Server.Handler] in your server’s configuration.

See https://abhinav.github.io/asciidoctor-godoc/ for complete documentation.