refactor: go fix ftw

This commit is contained in:
2026-02-19 17:37:42 +01:00
parent 9185ffa6b5
commit 85882bae14
21 changed files with 82 additions and 98 deletions

View File

@@ -115,10 +115,7 @@ func NewPageHandler(templatesDir string, authService AuthServiceInterface, postR
if start >= len(s) {
return ""
}
end := start + length
if end > len(s) {
end = len(s)
}
end := min(start+length, len(s))
return s[start:end]
},
"upper": strings.ToUpper,