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:
committed by
Cosmin Cojocar
parent
d3933f9e14
commit
0ba05e160a
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user