This is a simple Cloudflare worker for rendering the necessary HTML Meta tags to host Go modules on your own domain, or use your own domain as module import path.
This allows ivan.dev/custompkg
to be hosted at github.com/ivanvanderbyl/custompkg
and installed with go get ivan.dev/custompkg
. There are two main benefits to this: 1. I can change VCS providers without breaking anyones code, 2. It looks good.
For more information on how this works, see the Go docs
- Fork this repo
- Edit src/packages.ts to contain the packages you want host
- Deploy this worker to Cloudflare using
wrangler publish
- Configure the worker in Cloudflare to respond to each path that you configured in step 2, remember to include a
*
on the end to match query params fromgo get
.