1
0
mirror of https://github.com/securego/gosec.git synced 2025-12-01 22:41:54 +02:00

chore: fix lint warnings

Signed-off-by: Cosmin Cojocar <gcojocar@adobe.com>
This commit is contained in:
Cosmin Cojocar
2022-08-08 10:37:43 +02:00
committed by Cosmin Cojocar
parent d3933f9e14
commit 0ba05e160a
6 changed files with 10 additions and 14 deletions

View File

@@ -3,7 +3,6 @@ package testutils
import (
"fmt"
"go/build"
"io/ioutil"
"log"
"os"
"path"
@@ -30,7 +29,7 @@ type TestPackage struct {
// NewTestPackage will create a new and empty package. Must call Close() to cleanup
// auxiliary files
func NewTestPackage() *TestPackage {
workingDir, err := ioutil.TempDir("", "gosecs_test")
workingDir, err := os.MkdirTemp("", "gosecs_test")
if err != nil {
return nil
}
@@ -53,7 +52,7 @@ func (p *TestPackage) write() error {
return nil
}
for filename, content := range p.Files {
if e := ioutil.WriteFile(filename, []byte(content), 0o644); e != nil {
if e := os.WriteFile(filename, []byte(content), 0o644); e != nil {
return e
} //#nosec G306
}