mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
cleanup: use os.ReadFile to read file
as ioutil.ReadFile is deprecated and suggestion is to use os.ReadFile as per https://pkg.go.dev/io/ioutil updating the same. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
562dff0d19
commit
aba6979d29
@ -20,7 +20,6 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/ceph/ceph-csi/internal/util/k8s"
|
||||
@ -94,7 +93,7 @@ func GetKMS(tenant, kmsID string, secrets map[string]string) (EncryptionKMS, err
|
||||
func getKMSConfiguration() (map[string]interface{}, error) {
|
||||
var config map[string]interface{}
|
||||
// #nosec
|
||||
content, err := ioutil.ReadFile(kmsConfigPath)
|
||||
content, err := os.ReadFile(kmsConfigPath)
|
||||
if err == nil {
|
||||
// kmsConfigPath exists and was successfully read
|
||||
err = json.Unmarshal(content, &config)
|
||||
|
Reference in New Issue
Block a user