mirror of https://github.com/gofiber/fiber.git
🐛 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
parent
9b47b767b7
commit
07485247a5
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue