🐛 Fix - Gosec issue

[/github/workspace/helpers.go:91-93] - G307 (CWE-703): Deferring unsafe method "Close" on type "*os.File" (Confidence: HIGH, Severity: MEDIUM)
pull/1584/head
wernerr 2021-10-18 09:06:00 +02:00
parent 9b47b767b7
commit 07485247a5
1 changed files with 1 additions and 0 deletions

View File

@ -89,6 +89,7 @@ func readContent(rf io.ReaderFrom, name string) (n int64, err error) {
if err != nil {
return 0, err
}
// #nosec G307
defer func() {
if err = f.Close(); err != nil {
log.Printf("Error closing file: %s\n", err)