Skip to content

Commit cc0acad

Browse files
Remove deprecated ioutil calls
1 parent f2f6e46 commit cc0acad

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

driver.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package main
33
import (
44
"context"
55
"fmt"
6-
"io/ioutil"
76
"net"
87
"os"
98
"strings"
@@ -343,7 +342,7 @@ func (d *Driver) PreCreateCheck() error {
343342
return errors.Wrap(err, "could not get key")
344343
}
345344

346-
buf, err := ioutil.ReadFile(d.originalKey + ".pub")
345+
buf, err := os.ReadFile(d.originalKey + ".pub")
347346
if err != nil {
348347
return errors.Wrap(err, "could not read public key")
349348
}
@@ -587,7 +586,7 @@ func (d *Driver) createRemoteKeys() error {
587586
if d.KeyID == 0 {
588587
log.Infof("Creating SSH key...")
589588

590-
buf, err := ioutil.ReadFile(d.GetSSHKeyPath() + ".pub")
589+
buf, err := os.ReadFile(d.GetSSHKeyPath() + ".pub")
591590
if err != nil {
592591
return errors.Wrap(err, "could not read ssh public key")
593592
}

0 commit comments

Comments
 (0)