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

@@ -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)
}

View File

@@ -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
}