From 02734a5b4ffc555a47c5029422ae4015b59c138f Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 12 Aug 2021 13:10:25 -0700 Subject: vanity: rewrite with templates and external config Rewrite the program to use external templates and load the configuration from an external source. We don't want to blindly send all the requests to some SCM since we want to support only some modules / program that way. There's two templates, one for requests coming from a browser, which list all the supported modules, and one for the `go get` command. For requests coming from `go get`, we generate a template that indicates where the repository is. The external configuration is in YAML, and list all the supported repositories, and the URL of the repository. It assumes a default VCS for all the modules (git in our case). --- tools/govanity/vanity.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 tools/govanity/vanity.yaml (limited to 'tools/govanity/vanity.yaml') diff --git a/tools/govanity/vanity.yaml b/tools/govanity/vanity.yaml new file mode 100644 index 0000000..a757729 --- /dev/null +++ b/tools/govanity/vanity.yaml @@ -0,0 +1,5 @@ +baseUrl: golang.fcuny.net +vcs: git +repositories: + - name: homelab + repo: https://git.fcuny.net/fcuny/homelab -- cgit 1.4.1