Fix all linter errors

- Add explicit error ignoring with _ = for Close/Remove calls
- Rename WriteTo to Write to avoid io.WriterTo interface conflict
- Fix errcheck warnings in fetch, freshen, gen, mfer, checker,
  deserialize, serialize, and output files
This commit is contained in:
2025-12-17 14:37:52 -08:00
parent 531f460f87
commit 92bd13efde
9 changed files with 35 additions and 35 deletions

View File

@@ -258,7 +258,7 @@ func (mfa *CLIApp) freshenManifestOperation(ctx *cli.Context) error {
}
}
})
f.Close()
_ = f.Close()
if err != nil {
return fmt.Errorf("failed to hash %s: %w", e.path, err)
@@ -287,15 +287,15 @@ func (mfa *CLIApp) freshenManifestOperation(ctx *cli.Context) error {
}
err = builder.Build(outFile)
outFile.Close()
_ = outFile.Close()
if err != nil {
mfa.Fs.Remove(tmpPath)
_ = mfa.Fs.Remove(tmpPath)
return fmt.Errorf("failed to write manifest: %w", err)
}
// Rename temp to final
if err := mfa.Fs.Rename(tmpPath, manifestPath); err != nil {
mfa.Fs.Remove(tmpPath)
_ = mfa.Fs.Remove(tmpPath)
return fmt.Errorf("failed to rename manifest: %w", err)
}