diff options
author | Feuerfuchs <git@feuerfuchs.dev> | 2019-06-20 18:21:39 +0200 |
---|---|---|
committer | Feuerfuchs <git@feuerfuchs.dev> | 2019-06-20 18:21:39 +0200 |
commit | ae2b18218e9333f84f0763020f597a2caf6a293a (patch) | |
tree | 995a7bb3ee9f585875e49f3ff8333ab7f86943c2 | |
parent | Fix: Hide resource type for home page, too (diff) | |
download | gopherproxy-ae2b18218e9333f84f0763020f597a2caf6a293a.tar.gz gopherproxy-ae2b18218e9333f84f0763020f597a2caf6a293a.tar.bz2 gopherproxy-ae2b18218e9333f84f0763020f597a2caf6a293a.zip |
Fix: Another case where resource type was shown
-rw-r--r-- | template.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/template.go b/template.go index f369fb9..33486d5 100644 --- a/template.go +++ b/template.go | |||
@@ -17,7 +17,11 @@ var tpltext = `<!doctype html> | |||
17 | {{- $uriParts := split .URI "/" -}} | 17 | {{- $uriParts := split .URI "/" -}} |
18 | {{- $uriLast := $uriParts | last -}} | 18 | {{- $uriLast := $uriParts | last -}} |
19 | {{- $uriParts = $uriParts | pop -}} | 19 | {{- $uriParts = $uriParts | pop -}} |
20 | {{- if or (eq (len $uriParts) 1) (eq $uriLast "") -}} | 20 | {{- if eq $uriLast "" -}} |
21 | {{- $uriLast = $uriParts | last -}} | ||
22 | {{- $uriParts = $uriParts | pop -}} | ||
23 | {{- end -}} | ||
24 | {{- if eq (len $uriParts) 1 -}} | ||
21 | {{- $uriLast = $uriParts | last -}} | 25 | {{- $uriLast = $uriParts | last -}} |
22 | {{- $uriParts = $uriParts | pop -}} | 26 | {{- $uriParts = $uriParts | pop -}} |
23 | {{- end -}} | 27 | {{- end -}} |