Skip to content

Commit

Permalink
Rename variables to satisfy revive
Browse files Browse the repository at this point in the history
  • Loading branch information
chesshacker committed Feb 15, 2024
1 parent 34adf53 commit 829ec85
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,16 @@ func getVideos(service *youtube.Service, inputs programInputs) (result videosRes
}

func updateVideoStats(service *youtube.Service, videoResults *videosResult) {
videoIds := make([]string, len(videoResults.Videos))
videoIDs := make([]string, len(videoResults.Videos))
for i, video := range videoResults.Videos {
videoIds[i] = video.VideoId
videoIDs[i] = video.VideoId
}

// Iterate through the video IDs in chunks of maxResults
videosListPart := []string{"statistics"}
for i := 0; i < len(videoIds); i += maxResults {
videoIdsJoined := strings.Join(videoIds[i:min(i+maxResults, len(videoIds))], ",")
videosListCall := service.Videos.List(videosListPart).Id(videoIdsJoined)
for i := 0; i < len(videoIDs); i += maxResults {
videoIDsJoined := strings.Join(videoIDs[i:min(i+maxResults, len(videoIDs))], ",")
videosListCall := service.Videos.List(videosListPart).Id(videoIDsJoined)
videosListResponse, err := videosListCall.Do()
check(err)

Expand Down

0 comments on commit 829ec85

Please sign in to comment.