Handle ioutil deprecations (#53526)

* replace ioutil.ReadFile -> os.ReadFile

* replace ioutil.ReadAll -> io.ReadAll

* replace ioutil.TempFile -> os.CreateTemp

* replace ioutil.NopCloser -> io.NopCloser

* replace ioutil.WriteFile -> os.WriteFile

* replace ioutil.TempDir -> os.MkdirTemp

* replace ioutil.Discard -> io.Discard
This commit is contained in:
Jo
2022-08-10 15:37:51 +02:00
committed by GitHub
parent 4926767737
commit 062d255124
140 changed files with 462 additions and 492 deletions
@@ -2,7 +2,7 @@ package httpclientprovider
import (
"bytes"
"io/ioutil"
"io"
"net/http"
"github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
@@ -18,7 +18,7 @@ func (c *testContext) createRoundTripper(name string) http.RoundTripper {
return &http.Response{
StatusCode: http.StatusOK,
Request: req,
Body: ioutil.NopCloser(bytes.NewBufferString("")),
Body: io.NopCloser(bytes.NewBufferString("")),
}, nil
})
}