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/go.mod | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/govanity/go.mod') diff --git a/tools/govanity/go.mod b/tools/govanity/go.mod index 9d1ea60..d37f146 100644 --- a/tools/govanity/go.mod +++ b/tools/govanity/go.mod @@ -1,3 +1,5 @@ module golang.fcuny.net/vanity go 1.16 + +require gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b -- cgit v1.2.3