Go Import meta tag provider
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Heiko Schlittermann aca967c7e8
All checks were successful
nagonag (Push) / nagonag (push) Successful in 1m8s
Merge pull request '[nagonag] update dependencies (master)' (#6) from nagonag/update-master into master
Reviewed-on: #6
2026-09-26 14:03:45 +02:00
.forgejo/workflows ci: update workflow 2026-09-26 12:26:52 +02:00
debian cicd: update to gogogo workflow ai:claude-fable-5-1 2026-09-26 11:50:44 +02:00
ex Harden the service file 2021-10-23 20:01:04 +02:00
.gitignore Initial commit 2021-10-22 00:18:47 +02:00
.gogogo.conf gogogo: add oldstable 2026-09-26 12:29:44 +02:00
.golangci.yml lint 2025-05-21 00:10:28 +02:00
AGENTS.md cicd: update to gogogo workflow ai:claude-fable-5-1 2026-09-26 11:50:44 +02:00
go.mod deps(master): update minor/patch dependencies 2026-09-26 10:31:01 +00:00
go.sum deps(master): update minor/patch dependencies 2026-09-26 10:31:01 +00:00
LICENSE.txt add license 2023-12-11 12:33:52 +01:00
main.go fix: update selfupdate integration 2026-05-14 00:55:19 +02:00
README.md cicd: update to gogogo workflow ai:claude-fable-5-1 2026-09-26 11:50:44 +02:00
responder.go fix: strict XML response 2025-05-21 00:07:21 +02:00
responder_test.go lint 2025-05-21 00:10:28 +02:00

GoMeta - a simple meta data provider for go-import

Probably about the same as this

It implements the VCS-Find protocol.

I'd like to use names for my go module import paths that are independent on the VCS hoster, and are persistent for a longer period of time.

  • go.schlittermann.de/<package>
  • schlittermann.de/go/<package> (untested)

GoMeta

The GoMeta tool is a simple Web service, that serves the Go import HTTP requests like GET https://go.schlittermann.de/heiko/foo?go-get=1 and responds with a proper HTML containing meta tags pointing to the actual hosting site.

Currently this is done in a quite static manner, but as soon as there is enough demand, I'll extend GoMeta to read a configuration with mappings or similar (depending on the requirements).

Requests and responses

Installation

Releases are built with gogogo (see .gogogo.conf) and published at https://git.schlittermann.de/heiko/gometa:

  • a Debian package in the repository's Debian package registry (stable/main), installing /usr/bin/gometa, the systemd unit gometa.service and the conffile /etc/default/gometa;
  • the raw binary attached to the release, which is also what gometa -update fetches.

Alternatively: go install go.schlittermann.de/heiko/gometa@latest.

System Integration and Configuration

There is an example Systemd service file, which can help running the GoMeta server. This file serves as an example only. It is accompanied by an example defaults file which is referenced by the service file.

Standalone

You may run the GoMeta standalone, serving HTTP (-listen.http) and HTTPS (-listen.https), defaulting to ":80" and ":443". The HTTPS listener needs an X509 certificate (-crt and -key).

Behind a Webserver

You can run GoMeta behind a webserver doing all the TLS stuff for you:

<VirtualHost *:443>
  # Run GoMeta as
  # gometa -listen.http=localhost:8080 -listen.https="" -trust-x-forwarded-for
  # and forward the requests.
  ServerName go.schlittermann.de
  CustomLog …
  ErrorLog …

  SSLEngine On
  SSLCertificateFile      …
  SSLCertificateKeyFile   …

  ProxyPreserveHost On
  ProxyPass / http://localhost:8080/
  ProxyPassReverse / http://localhost:8080/
</VirtualHost>