feat(tests): .Close() can be "unchecked"

This commit is contained in:
2025-06-04 14:41:53 +02:00
parent def5d097a4
commit a8341a9b44
3 changed files with 3 additions and 7 deletions

View File

@@ -630,10 +630,8 @@ func writeContent(path string, content []byte) {
fmt.Println(utils.IconFailure, err)
os.Exit(1)
}
defer f.Close()
defer func() {
if err := f.Close(); err != nil {
log.Fatal(err)
}
if _, err := f.Write(content); err != nil {
log.Fatal(err)
}