mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-14 06:15:45 +00:00
chore: io/ioutil deprecated
This commit is contained in:
parent
c47fa95d93
commit
58751405a6
@ -20,7 +20,6 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"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."
|
// "Creation of target_path is the responsibility of the SP."
|
||||||
// Our plugin depends on it.
|
// Our plugin depends on it.
|
||||||
if req.VolumeCapability.GetBlock() != nil {
|
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)
|
return nil, fmt.Errorf("cannot create target path %s for block file: %s", req.TargetPath, err)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user