mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 23:35:15 +08:00
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:
@ -3,7 +3,7 @@ package pluginproxy
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
"text/template"
|
||||
@ -78,7 +78,7 @@ func setBodyContent(req *http.Request, route *plugins.Route, data templateData)
|
||||
return err
|
||||
}
|
||||
|
||||
req.Body = ioutil.NopCloser(strings.NewReader(interpolatedBody))
|
||||
req.Body = io.NopCloser(strings.NewReader(interpolatedBody))
|
||||
req.ContentLength = int64(len(interpolatedBody))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user