From c7362ab83162e5bcf9b4511bb132638e30e08295 Mon Sep 17 00:00:00 2001 From: gotjosh Date: Wed, 9 Nov 2022 17:20:22 +0000 Subject: [PATCH] Fix comments Signed-off-by: gotjosh --- notify/util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notify/util.go b/notify/util.go index 9cdbee8c..bfa17c1a 100644 --- a/notify/util.go +++ b/notify/util.go @@ -81,7 +81,7 @@ func Drain(r *http.Response) { r.Body.Close() } -// Truncate truncates a string to fit the given size in Bytes. +// Truncate truncates a string to fit the given size in Runes. func TruncateInRunes(s string, n int) (string, bool) { r := []rune(s) if len(r) <= n { @@ -95,7 +95,7 @@ func TruncateInRunes(s string, n int) (string, bool) { return string(r[:n-1]) + "…", true } -// Truncate truncates a string to fit the given size in Runes. +// Truncate truncates a string to fit the given size in Bytes. func TruncateInBytes(s string, n int) (string, bool) { if len(s) <= n { return s, false