mirror of
https://github.com/securego/gosec.git
synced 2026-01-15 01:33:41 +08: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
@@ -17,7 +17,7 @@ package main
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"runtime"
|
||||
@@ -354,7 +354,7 @@ func main() {
|
||||
}
|
||||
|
||||
if *flagQuiet {
|
||||
logger = log.New(ioutil.Discard, "", 0)
|
||||
logger = log.New(io.Discard, "", 0)
|
||||
} else {
|
||||
logger = log.New(logWriter, "[gosec] ", log.LstdFlags)
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"go/format"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/mozilla/tls-observatory/constants"
|
||||
@@ -187,7 +187,7 @@ func main() {
|
||||
}
|
||||
|
||||
outputPath := filepath.Join(dir, *outputFile)
|
||||
if err := ioutil.WriteFile(outputPath, src, 0o644); err != nil {
|
||||
if err := os.WriteFile(outputPath, src, 0o644); err != nil {
|
||||
log.Fatalf("Writing output: %s", err)
|
||||
} //#nosec G306
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user