clean code, add golangci config, preallocate some slices and avoid copying body before parsing json (#9)

This commit is contained in:
dogghi no 2025-04-28 17:23:40 +02:00 committed by GitHub
parent 0a146c515c
commit c7a2612056
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 49 additions and 45 deletions

View file

@ -114,7 +114,7 @@ func HandleDefaultStoredFormatDownload(
storedMedias[0],
isCaptionEnabled,
)
var medias []*models.DownloadedMedia
medias := make([]*models.DownloadedMedia, 0, len(storedMedias))
for _, media := range storedMedias {
medias = append(medias, &models.DownloadedMedia{
FilePath: "",