Utilities for hosting Go packages on custom/vanity domains.
- automatic
go-import
andgo-source
parameters used by Go tooling - theming with professional listing and package views by default
- configurable action links for packages (e.g.
pkg.go.dev
, repository source, custom URLs) - used as a server, static site generator, or generic
http.Handler
- YAML-based or programmatic configuration
For a live example, visit go.dpb.io (source; automated via Cloud Build and deployed to Cloud Run).
To run a server locally, use the cmd/server
package...
go run go.dpb.io/importshttp/cmd/server \
-pkg=go.example.com/firstpackage=github.com/golang/go/tree/master \
-pkg=go.example.com/secondpackage=bitbucket.org/example/secondpackage/src/master
To publish a static site with GitHub Pages + Actions, use the dpb587/go-importshttp-for-github
template.
Learn more from the examples
directory and code documentation.