mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 22:05:59 +00:00
chore: io/ioutil deprecated
This commit is contained in:
parent
c47fa95d93
commit
58751405a6
@ -20,7 +20,6 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
@ -205,7 +204,7 @@ func (f *NodeClient) NodePublishVolume(ctx context.Context, req *csipb.NodePubli
|
||||
// "Creation of target_path is the responsibility of the SP."
|
||||
// Our plugin depends on it.
|
||||
if req.VolumeCapability.GetBlock() != nil {
|
||||
if err := ioutil.WriteFile(req.TargetPath, []byte{}, 0644); err != nil {
|
||||
if err := os.WriteFile(req.TargetPath, []byte{}, 0644); err != nil {
|
||||
return nil, fmt.Errorf("cannot create target path %s for block file: %s", req.TargetPath, err)
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user