chore: gofix (#1466)

Signed-off-by: Jason Cameron <jason.cameron@stanwith.me>
This commit is contained in:
Jason Cameron
2026-03-18 10:17:28 -04:00
committed by GitHub
parent c6d968874d
commit 5186d7d3ad
22 changed files with 59 additions and 78 deletions

View File

@@ -182,10 +182,7 @@ func makeCode(err error) string {
enc := base64.StdEncoding.EncodeToString(buf.Bytes())
var builder strings.Builder
for i := 0; i < len(enc); i += width {
end := i + width
if end > len(enc) {
end = len(enc)
}
end := min(i+width, len(enc))
builder.WriteString(enc[i:end])
builder.WriteByte('\n')
}