mirror of
https://github.com/grafana/grafana.git
synced 2026-08-18 17:15:08 -05: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:
@@ -4,7 +4,7 @@ import (
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
)
|
||||
@@ -13,7 +13,7 @@ var tlslog = log.New("tls_mysql")
|
||||
|
||||
func makeCert(config DatabaseConfig) (*tls.Config, error) {
|
||||
rootCertPool := x509.NewCertPool()
|
||||
pem, err := ioutil.ReadFile(config.CaCertPath)
|
||||
pem, err := os.ReadFile(config.CaCertPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not read DB CA Cert path %q: %w", config.CaCertPath, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user