From cc0acadaf265d22d6386fcd30967142da7d15b54 Mon Sep 17 00:00:00 2001
From: JonasS <jonass@dev.jsje.de>
Date: Wed, 17 Aug 2022 19:15:32 +0200
Subject: [PATCH] Remove deprecated ioutil calls

---
 driver.go | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/driver.go b/driver.go
index 02f4b82..68d78e8 100644
--- a/driver.go
+++ b/driver.go
@@ -3,7 +3,6 @@ package main
 import (
 	"context"
 	"fmt"
-	"io/ioutil"
 	"net"
 	"os"
 	"strings"
@@ -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")
 		}
@@ -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")
 		}
-- 
GitLab