Skip to content

Commit

Permalink
Remove deprecated ioutil calls
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasProgrammer committed Aug 17, 2022
1 parent f2f6e46 commit cc0acad
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"context"
"fmt"
"io/ioutil"
"net"
"os"
"strings"
Expand Down Expand Up @@ -343,7 +342,7 @@ func (d *Driver) PreCreateCheck() error {
return errors.Wrap(err, "could not get key")
}

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

buf, err := ioutil.ReadFile(d.GetSSHKeyPath() + ".pub")
buf, err := os.ReadFile(d.GetSSHKeyPath() + ".pub")
if err != nil {
return errors.Wrap(err, "could not read ssh public key")
}
Expand Down

0 comments on commit cc0acad

Please sign in to comment.