fix(lint): resolve all errcheck violations in ingestion module
All checks were successful
cd / Build and deploy (push) Successful in 10s
CI / Lint / Test / Vet (push) Successful in 10s
CI / Mirror to GitHub (push) Successful in 3s

This commit is contained in:
Mathias Bergqvist
2026-04-23 16:20:59 +02:00
parent a6c39e8691
commit 3607920601
6 changed files with 15 additions and 15 deletions

View File

@@ -158,15 +158,15 @@ func copyFile(src, dst string) error {
if err != nil {
return fmt.Errorf("open src: %w", err)
}
defer in.Close()
defer in.Close() //nolint:errcheck
out, err := os.Create(dst)
if err != nil {
return fmt.Errorf("create dst: %w", err)
}
defer out.Close()
if _, err := io.Copy(out, in); err != nil {
out.Close() //nolint:errcheck
return fmt.Errorf("copy: %w", err)
}
return out.Close()
@@ -201,10 +201,10 @@ func appendWatcherLog(brainDir, filename string, runErr error, date string) erro
if err != nil {
return fmt.Errorf("open log: %w", err)
}
defer f.Close()
if _, err = f.WriteString(entry); err != nil {
f.Close() //nolint:errcheck
return fmt.Errorf("write log: %w", err)
}
return nil
return f.Close()
}