From 8a0c579592136da8105d54081c3f69060c4dcf71 Mon Sep 17 00:00:00 2001 From: Tyler Sullivan Date: Mon, 3 Jan 2022 16:36:17 -0800 Subject: Support package-level overrides for URLs (#52) Sally accepts the base vanity URL (e.g. `go.uber.org`) in a top-level `url` key. This applies to all packages listed in the configuration. Add support for overriding the `url` on a per-package basis. This will provide for an easier transition period when migrating Go packages of an organization between hosts, for example from BitBucket to GitHub. With this, source code can be modified across the various repositories over time to use the new vanity URL. For example, some packages will use a URL of bitbucketurl.org and some will use mycoolgoimportvanity.org in their source code imports. Other than the use-case outlined above, this feature adds flexibility to the vanity server to support more than one vanity URL when used behind an ingress controller. --- config.go | 1 + 1 file changed, 1 insertion(+) (limited to 'config.go') diff --git a/config.go b/config.go index 1699e7f..e322da3 100644 --- a/config.go +++ b/config.go @@ -25,6 +25,7 @@ type Config struct { type Package struct { Repo string `yaml:"repo"` Branch string `yaml:"branch"` + URL string `yaml:"url"` } // ensureAlphabetical checks that the packages are listed alphabetically in the configuration. -- cgit v1.2.3