From 2b5ff69db3bed5477fc6217ef99812edbf0ce65d Mon Sep 17 00:00:00 2001 From: tobi Date: Sun, 15 Sep 2024 16:23:03 +0200 Subject: [PATCH] lint --- internal/typeutils/util.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/internal/typeutils/util.go b/internal/typeutils/util.go index f660efc84..bb61ffb66 100644 --- a/internal/typeutils/util.go +++ b/internal/typeutils/util.go @@ -299,21 +299,21 @@ func StatusHash(s *gtsmodel.Status) string { hash := xxhash.New() // Content warning / title. - hash.WriteString(s.ContentWarning) + hash.WriteString(s.ContentWarning) // nolint:errcheck // Status content. - hash.WriteString(s.Content) + hash.WriteString(s.Content) // nolint:errcheck // Media IDs + descriptions. for _, attachment := range s.Attachments { - hash.WriteString(attachment.ID) - hash.WriteString(attachment.Description) + hash.WriteString(attachment.ID) // nolint:errcheck + hash.WriteString(attachment.Description) // nolint:errcheck } // Poll options. if s.Poll != nil { for _, option := range s.Poll.Options { - hash.WriteString(option) + hash.WriteString(option) // nolint:errcheck } } @@ -354,9 +354,7 @@ func filterableText(s *gtsmodel.Status) string { // Poll options. if s.Poll != nil { - for _, option := range s.Poll.Options { - fields = append(fields, option) - } + fields = append(fields, s.Poll.Options...) } return strings.Join(fields, " ")