Skip to content

Commit

Permalink
chore: de-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
skandragon committed Feb 13, 2023
1 parent 502b701 commit 62c2ff8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/envoy-scraper/digest_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"encoding/hex"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"strings"
"time"
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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]
}

Expand Down

0 comments on commit 62c2ff8

Please sign in to comment.