cmd/golink: use relative links

use relative links throughout rather than hardcoding the go hostname,
which allows things to continue working when other hostnames are used.

Change-Id: I5df0d10214799de9722871cbad99bf9af129941f
This commit is contained in:
Will Norris
2022-06-29 13:32:58 -07:00
parent c7f68940d6
commit a6f3c8ed8d
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ Include a "+" after a link to get information about a link without resolving it:
</pre>
<p>
Visit <a href="http://go/.export">go/.export</a> to export all saved links and their metadata in <a href="https://jsonlines.org/">JSON Lines format</a>.
Visit <a href="/.export">go/.export</a> to export all saved links and their metadata in <a href="https://jsonlines.org/">JSON Lines format</a>.
This is useful to create data snapshots that can be restored later.
<pre>{{`$ curl go/.export
+1 -1
View File
@@ -23,7 +23,7 @@
</thead>
<tbody>
{{range .Clicks}}
<tr class="hover:bg-gray-100 border-b border-gray-200"><td><a class="block p-2 pr-8 hover:text-blue-500 hover:underline" href="http://go/{{.Short}}">go/{{.Short}}</a></td><td class="p-2">{{.NumClicks}}</td></tr>
<tr class="hover:bg-gray-100 border-b border-gray-200"><td><a class="block p-2 pr-8 hover:text-blue-500 hover:underline" href="/{{.Short}}">go/{{.Short}}</a></td><td class="p-2">{{.NumClicks}}</td></tr>
{{end}}
</tbody>
</table>
+1 -1
View File
@@ -1,5 +1,5 @@
{{ define "main" }}
<h2 class="text-xl font-bold pb-2">Success</h2>
<p><a class="text-blue-600 hover:underline" href="http://go/{{.Short}}">go/{{.Short}}</a> has been saved.</p>
<p><a class="text-blue-600 hover:underline" href="/{{.Short}}">go/{{.Short}}</a> has been saved.</p>
{{ end }}