clean code, add golangci config, preallocate some slices and avoid copying body before parsing json (#9)
This commit is contained in:
parent
0a146c515c
commit
c7a2612056
12 changed files with 49 additions and 45 deletions
|
@ -246,7 +246,7 @@ func (media *Media) GetSortedFormats() []*MediaFormat {
|
|||
}
|
||||
|
||||
// combine the best video and audio into a final list
|
||||
var finalSortedList []*MediaFormat
|
||||
finalSortedList := make([]*MediaFormat, 0, len(groupedVideos)+len(groupedAudios)+len(media.Formats))
|
||||
for _, best := range groupedVideos {
|
||||
finalSortedList = append(finalSortedList, best)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue