forked from Silverfish/proton-bridge
chore: update golangci-lint to 1.61.0.
This commit is contained in:
@ -114,7 +114,7 @@ func (b *BuildStage) run(ctx context.Context) {
|
||||
messages: nil,
|
||||
}); err != nil {
|
||||
err = fmt.Errorf("failed to produce output for next stage: %w", err)
|
||||
logrus.Errorf(err.Error())
|
||||
logrus.Error(err.Error())
|
||||
req.job.onError(err)
|
||||
}
|
||||
|
||||
@ -217,7 +217,7 @@ func chunkSyncBuilderBatch(batch []proton.FullMessage, maxMemory uint64) [][]pro
|
||||
for _, v := range batch {
|
||||
var dataSize uint64
|
||||
for _, a := range v.Attachments {
|
||||
dataSize += uint64(a.Size)
|
||||
dataSize += uint64(a.Size) //nolint:gosec // disable G115
|
||||
}
|
||||
|
||||
// 2x increase for attachment due to extra memory needed for decrypting and writing
|
||||
|
||||
@ -231,7 +231,7 @@ func downloadAttachment(ctx context.Context, cache *DownloadCache, client APICli
|
||||
}
|
||||
|
||||
type DownloadRateModifier interface {
|
||||
Apply(wasSuccess bool, current int, max int) int
|
||||
Apply(wasSuccess bool, current int, max int) int //nolint:predeclared
|
||||
}
|
||||
|
||||
func autoDownloadRate[T any, R any](
|
||||
@ -285,7 +285,7 @@ func autoDownloadRate[T any, R any](
|
||||
|
||||
type DefaultDownloadRateModifier struct{}
|
||||
|
||||
func (d DefaultDownloadRateModifier) Apply(wasSuccess bool, current int, max int) int {
|
||||
func (d DefaultDownloadRateModifier) Apply(wasSuccess bool, current int, max int) int { //nolint:predeclared
|
||||
if !wasSuccess {
|
||||
return 2
|
||||
}
|
||||
|
||||
@ -217,7 +217,7 @@ func (m *metadataIterator) Next(maxDownloadMem uint64, metadataPageSize int, max
|
||||
}
|
||||
|
||||
for idx, meta := range m.remaining {
|
||||
nextSize := m.expectedSize + uint64(meta.Size)
|
||||
nextSize := m.expectedSize + uint64(meta.Size) //nolint:gosec // disable G115
|
||||
if nextSize >= maxDownloadMem || len(m.downloadReqIDs) >= maxMessages {
|
||||
m.expectedSize = 0
|
||||
m.remaining = m.remaining[idx:]
|
||||
|
||||
Reference in New Issue
Block a user