Skip to content

Commit 8e0a693

Browse files
committed
chore(cmd): cosmetic changes
Signed-off-by: AtomicFS <vojtech.vesely@9elements.com>
1 parent e10b810 commit 8e0a693

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmd/firmware-action/filesystem/filesystem.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ func sanitizeAndTruncate(input string, length int) string {
290290
// https://www.compart.com/en/unicode/category/Cc
291291
result = strings.ToValidUTF8(result, "_")
292292

293+
// slicing works with bytes, not runes
294+
// range works with runes
293295
if len(result) > length {
294296
return string(result[:length])
295297
}

0 commit comments

Comments
 (0)