diff options
-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 -}} |