Skip to content

Commit

Permalink
common: Ignore gosec bug
Browse files Browse the repository at this point in the history
  • Loading branch information
croissanne authored and teg committed Oct 21, 2021
1 parent b074aa9 commit 158a90d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/common/distribution.go
Expand Up @@ -67,7 +67,9 @@ func ReadDistributions(distsDir, distro string) ([]DistributionFile, error) {
if err != nil {
return err
}
defer func() { // #nosec G307 https://github.com/securego/gosec/issues/714
// nosec because of https://github.com/securego/gosec/issues/714
/* #nosec G307 */
defer func() {
err := f.Close()
if err != nil {
fmt.Printf("Error closing file: %v", err)
Expand Down Expand Up @@ -142,7 +144,9 @@ func FindPackages(distsDir, distro, arch, search string) ([]Package, error) {
if err != nil {
return nil, err
}
defer func() { // #nosec G307 https://github.com/securego/gosec/issues/714
// nosec because of https://github.com/securego/gosec/issues/714
/* #nosec G307 */
defer func() {
err := f.Close()
if err != nil {
fmt.Printf("Error closing file: %v", err)
Expand Down

0 comments on commit 158a90d

Please sign in to comment.