From 62c2ff867d208fb38e848b32c646a1d1a120e6d9 Mon Sep 17 00:00:00 2001 From: Michael Graff Date: Sun, 12 Feb 2023 21:20:00 -0600 Subject: [PATCH] chore: de-lint --- app/envoy-scraper/digest_http.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/envoy-scraper/digest_http.go b/app/envoy-scraper/digest_http.go index 921ff83..07db76f 100644 --- a/app/envoy-scraper/digest_http.go +++ b/app/envoy-scraper/digest_http.go @@ -22,7 +22,7 @@ import ( "encoding/hex" "fmt" "io" - "io/ioutil" + "log" "net/http" "strings" "time" @@ -64,7 +64,7 @@ func digestGet(username string, password string, uri string) (int, []byte, error return -1, []byte{}, err } defer resp.Body.Close() - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { return -1, []byte{}, err } @@ -95,7 +95,10 @@ func getMD5(text string) string { func getCnonce() string { b := make([]byte, 8) - io.ReadFull(rand.Reader, b) + _, err := io.ReadFull(rand.Reader, b) + if err != nil { + log.Printf("Reading nonce: %v", err) + } return fmt.Sprintf("%x", b)[:16] }