diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-10-09 09:01:24 -0600 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-10-09 09:01:24 -0600 |
commit | 68e2091437e178dc98987d463180c17bfe346b9a (patch) | |
tree | d418d8c379736dd564af87ba935a172a61c28e0b /templates/repo_root.gph | |
parent | d5566a4ed9adf999e2e6a781913df27a0d9c77fe (diff) |
use the {{join}} function in gopher templates
$.Selector can be "/", which is handled better by 'join' than just concatenating with the template itself
Diffstat (limited to 'templates/repo_root.gph')
-rw-r--r-- | templates/repo_root.gph | 2 |
1 files changed, 1 insertions, 1 deletions
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 -}} .
|