fix: be compliant with golanci linter
All checks were successful
Lint Markdown files / Run markdown linter (push) Successful in 13s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 30s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m38s

This commit is contained in:
2025-08-12 16:28:40 +02:00
parent d2cf678b97
commit 2f17abedb9
5 changed files with 50 additions and 21 deletions

View File

@ -3,6 +3,7 @@ package main
import (
"context"
"fmt"
"log"
"time"
"git.cryptic.systems/volker.raschek/tarr/pkg/config"
@ -95,7 +96,10 @@ healarr sonarr https://sonarr.example.com:8443 --api-token my-token`,
rootCmd.PersistentFlags().Bool("insecure", false, "Trust insecure TLS certificates")
rootCmd.PersistentFlags().Duration("timeout", time.Minute, "Timeout")
rootCmd.Execute()
err := rootCmd.Execute()
if err != nil {
log.Fatalln(err)
}
}
func runBazarrE(cmd *cobra.Command, args []string) error {
@ -152,7 +156,7 @@ func runE(cmd *cobra.Command, args []string, queryKey string) error {
switch {
case len(apiToken) <= 0 && len(configPath) <= 0:
return fmt.Errorf("At least --api-token oder --config must be defined")
return fmt.Errorf("at least --api-token oder --config must be defined")
case len(apiToken) > 0 && len(configPath) <= 0:
err = health.NewReadinessProbe(args[0]).
QueryAdd(queryKey, apiToken).
@ -175,7 +179,7 @@ func runE(cmd *cobra.Command, args []string, queryKey string) error {
return err
}
default:
return fmt.Errorf("Neither --api-token nor --config can be used at the same time.")
return fmt.Errorf("neither --api-token nor --config can be used at the same time")
}
return nil