mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 02:37:13 -04:00
refactor: Remove unnecessary type conversions (#772)
This commit is contained in:
parent
4faf097fb9
commit
25663b5816
4 changed files with 5 additions and 5 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue