diff options
author | 2022-01-03 16:36:17 -0800 | |
---|---|---|
committer | 2022-01-03 16:36:17 -0800 | |
commit | 8a0c579592136da8105d54081c3f69060c4dcf71 (patch) | |
tree | e9a54b6e9ca5fc1f6d31af3e3bd23abafce43218 /templates | |
parent | dd62ebd406a23184ec072d38894a5a3aac141b0d (diff) | |
download | sally-8a0c579592136da8105d54081c3f69060c4dcf71.tar.gz sally-8a0c579592136da8105d54081c3f69060c4dcf71.tar.zst sally-8a0c579592136da8105d54081c3f69060c4dcf71.zip |
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.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/index.html | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/index.html b/templates/index.html index 50b6004..2599bf0 100644 --- a/templates/index.html +++ b/templates/index.html @@ -17,6 +17,9 @@ <tbody> {{ range $key, $value := .Packages }} {{ $importPath := printf "%v/%v" $.URL $key }} + {{ if ne $value.URL "" }} + {{ $importPath = printf "%v/%v" $value.URL $key }} + {{ end }} <tr> <td>{{ $importPath }}</td> <td> |