File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ package state
21
21
import (
22
22
"encoding/json"
23
23
"errors"
24
- "io/ioutil"
25
24
"os"
26
25
27
26
timestamp "github.com/golang/protobuf/ptypes/timestamp"
@@ -145,7 +144,7 @@ func (s *state) dump() error {
145
144
if err != nil {
146
145
return status .Errorf (codes .Internal , "error encoding volumes and snapshots: %v" , err )
147
146
}
148
- if err := ioutil .WriteFile (s .statefilePath , data , 0600 ); err != nil {
147
+ if err := os .WriteFile (s .statefilePath , data , 0600 ); err != nil {
149
148
return status .Errorf (codes .Internal , "error writing state file: %v" , err )
150
149
}
151
150
return nil
@@ -155,7 +154,7 @@ func (s *state) restore() error {
155
154
s .Volumes = nil
156
155
s .Snapshots = nil
157
156
158
- data , err := ioutil .ReadFile (s .statefilePath )
157
+ data , err := os .ReadFile (s .statefilePath )
159
158
switch {
160
159
case errors .Is (err , os .ErrNotExist ):
161
160
// Nothing to do.
You can’t perform that action at this time.
0 commit comments