Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
corny committed Mar 11, 2024
1 parent 3277442 commit 4e2e0fc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/youtubedr/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var downloadCmd = &cobra.Command{
Short: "Downloads a video from youtube",
Example: `youtubedr -o "Campaign Diary".mp4 https://www.youtube.com/watch\?v\=XbNghLqsVwU`,
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, args []string) {
exitOnError(download(args[0]))
},
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/youtubedr/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ var infoCmd = &cobra.Command{
Use: "info",
Short: "Print metadata of the desired video",
Args: cobra.ExactArgs(1),
PreRunE: func(cmd *cobra.Command, args []string) error {
PreRunE: func(_ *cobra.Command, _ []string) error {
return checkOutputFormat()
},
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, args []string) {
video, err := getDownloader().GetVideo(args[0])
exitOnError(err)

Expand Down
4 changes: 2 additions & 2 deletions cmd/youtubedr/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ var (
Use: "list",
Short: "Print metadata of the desired playlist",
Args: cobra.ExactArgs(1),
PreRunE: func(cmd *cobra.Command, args []string) error {
PreRunE: func(_ *cobra.Command, _ []string) error {
return checkOutputFormat()
},
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, args []string) {
playlist, err := getDownloader().GetPlaylist(args[0])
exitOnError(err)

Expand Down
2 changes: 1 addition & 1 deletion cmd/youtubedr/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var urlCmd = &cobra.Command{
Use: "url",
Short: "Only output the stream-url to desired video",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, args []string) {
video, format, err := getVideoWithFormat(args[0])
exitOnError(err)

Expand Down
2 changes: 1 addition & 1 deletion cmd/youtubedr/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var (
var versionCmd = &cobra.Command{
Use: "version",
Short: "Prints version information",
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
fmt.Println("Version: ", version)
fmt.Println("Commit: ", commit)
fmt.Println("Date: ", date)
Expand Down

0 comments on commit 4e2e0fc

Please sign in to comment.