From 68e2091437e178dc98987d463180c17bfe346b9a Mon Sep 17 00:00:00 2001 From: tjpcc Date: Mon, 9 Oct 2023 09:01:24 -0600 Subject: use the {{join}} function in gopher templates $.Selector can be "/", which is handled better by 'join' than just concatenating with the template itself --- templates/repo_root.gph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates/repo_root.gph') diff --git a/templates/repo_root.gph b/templates/repo_root.gph index 35592a4..e4e2754 100644 --- a/templates/repo_root.gph +++ b/templates/repo_root.gph @@ -2,6 +2,6 @@ iRepositories {{.Selector}} {{.Host}} {{.Port}} i------------ {{.Selector}} {{.Host}} {{.Port}} i {{.Selector}} {{.Host}} {{.Port}} {{ range .Repos -}} -1{{.}} {{$.Selector}}/{{.}} {{$.Host}} {{$.Port}} +1{{.}} {{join $.Selector .}} {{$.Host}} {{$.Port}} {{ end -}} . -- cgit v1.2.3