Skip to content

Commit

Permalink
Fix ioutil deprecation (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesusfcr authored Mar 21, 2024
1 parent 0b42852 commit cc78578
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/vulnerability-db-rstats/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Copyright 2020 Adevinta
package main

import (
"io/ioutil"
"io"
"os"

log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -39,7 +39,7 @@ func parseConfig(cfgFilePath string) (*config, error) {
}
defer cfgFile.Close()

cfgData, err := ioutil.ReadAll(cfgFile)
cfgData, err := io.ReadAll(cfgFile)

var conf config
if _, err := toml.Decode(string(cfgData[:]), &conf); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/results/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package results
import (
"errors"
"fmt"
"io/ioutil"
"io"
"net/http"

report "github.com/adevinta/vulcan-report"
Expand Down Expand Up @@ -57,7 +57,7 @@ func (c *reportClient) Download(reportURL string) (report.Report, error) {
return report.Report{}, ErrInvalidRespStatus
}

body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return report.Report{}, err
}
Expand Down

0 comments on commit cc78578

Please sign in to comment.