ref: a721fbed1daf5f9046ceff5f831f9a859347bd90
parent: 3739871f1e9fa1edffe80fea289dde33388949b4
author: Bjørn Erik Pedersen <[email protected]>
date: Wed Nov 23 13:46:32 EST 2016
target: Simplify
--- a/target/htmlredirect.go
+++ b/target/htmlredirect.go
@@ -104,9 +104,7 @@
}
// Add the final touch
- if strings.HasPrefix(alias, helpers.FilePathSeparator) {
- alias = alias[1:]
- }
+ alias = strings.TrimPrefix(alias, helpers.FilePathSeparator)
if strings.HasSuffix(alias, helpers.FilePathSeparator) {
alias = alias + "index.html"
} else if !strings.HasSuffix(alias, ".html") {