diff options
author | 2024-10-16 14:13:58 +0200 | |
---|---|---|
committer | 2024-10-16 14:13:58 +0200 | |
commit | a48cce82b9b235a0e844104a89453eb0bd4d4409 (patch) | |
tree | ac319b5c6854710df74d605e3e266d8bc320b530 /internal/media/refetch.go | |
parent | [docs] remove duplicate entry from supported platforms (#3442) (diff) | |
download | gotosocial-a48cce82b9b235a0e844104a89453eb0bd4d4409.tar.xz |
[chore] Upgrade golangci-lint, ignore existing int overflow warnings (#3420)
* [chore] Bump tooling versions, bump go -> v1.23.0
* undo silly change
* sign
* bump go version in go.mod
* allow overflow in imaging
* goreleaser deprecation notices
* [chore] Upgrade golangci-lint, ignore existing int overflow warnings
There is a new lint for unchecked int casts. Integer overflows are bad,
but the old code that triggers this lint seems to be perfectly fine.
Instead of disabling the lint entirely for new code as well, grandfather
in existing code.
* fix golangci-lint documentation link
* revert unrelated changes
* revert another unrelated change
* get rid of remaining nolint:gosec
* swagger updates
* apply review feedback
* fix wrong formatting specifier thing
* fix the linter for real
---------
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Diffstat (limited to 'internal/media/refetch.go')
-rw-r--r-- | internal/media/refetch.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/media/refetch.go b/internal/media/refetch.go index 5531f6d97..c467333c9 100644 --- a/internal/media/refetch.go +++ b/internal/media/refetch.go @@ -49,9 +49,6 @@ func (m *Manager) RefetchEmojis(ctx context.Context, domain string, dereferenceM refetchIDs []string ) - // Get max supported remote emoji media size. - maxsz := config.GetMediaEmojiRemoteMaxSize() - // page through emojis 20 at a time, looking for those with missing images for { // Fetch next block of emojis from database @@ -111,8 +108,10 @@ func (m *Manager) RefetchEmojis(ctx context.Context, domain string, dereferenceM continue } + // Get max supported remote emoji media size. + maxsz := int64(config.GetMediaEmojiRemoteMaxSize()) // #nosec G115 -- Already validated. dataFunc := func(ctx context.Context) (reader io.ReadCloser, err error) { - return dereferenceMedia(ctx, emojiImageIRI, int64(maxsz)) + return dereferenceMedia(ctx, emojiImageIRI, maxsz) } processingEmoji, err := m.UpdateEmoji(ctx, emoji, dataFunc, AdditionalEmojiInfo{ |