Go Import meta tag provider
Find a file
2025-05-25 16:13:57 +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 build: fix token location 2025-05-25 15:04:55 +02:00
.golangci.yml lint 2025-05-21 00:10:28 +02:00
go.mod go: update dependencies 2025-05-25 16:13:57 +02:00
go.sum go: update dependencies 2025-05-25 16:13:57 +02:00
LICENSE.txt add license 2023-12-11 12:33:52 +01:00
main.go use selfupdate 2025-05-25 14:10:48 +02:00
Makefile Provide a Makefile 2021-10-22 20:00:24 +02:00
README.md doc: cleanup 2025-05-20 21:05:16 +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

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>