summaryrefslogtreecommitdiffstats
path: root/modules/templates
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2017-01-27 23:03:32 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2017-01-27 23:03:32 +0800
commit25663b58161c48bdc8e9cae900544378dede0d2b (patch)
tree1d0cab794b549116cf685101a62cc21634356d6b /modules/templates
parent4faf097fb9d07003b52d5f6e51ad3e624a5db062 (diff)
downloadgitea-25663b58161c48bdc8e9cae900544378dede0d2b.tar.gz
gitea-25663b58161c48bdc8e9cae900544378dede0d2b.zip
refactor: Remove unnecessary type conversions (#772)
Diffstat (limited to 'modules/templates')
-rw-r--r--modules/templates/helper.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index f65b8c6856..0c56ae0e0a 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -121,8 +121,8 @@ func NewFuncMap() []template.FuncMap {
var path []string
index := strings.LastIndex(str, "/")
if index != -1 && index != len(str) {
- path = append(path, string(str[0:index+1]))
- path = append(path, string(str[index+1:]))
+ path = append(path, str[0:index+1])
+ path = append(path, str[index+1:])
} else {
path = append(path, str)
}