resolve ioutil deprecations

This commit is contained in:
Mikaël Cluseau
2025-01-26 11:31:04 +01:00
parent ce8b7f01ef
commit 82f7cbcc92
7 changed files with 14 additions and 21 deletions

View File

@ -10,7 +10,6 @@ import (
"crypto/x509"
"encoding/asn1"
"fmt"
"io/ioutil"
"os"
"os/exec"
)
@ -42,7 +41,7 @@ genLoop:
}
err = func() (err error) {
outFile, err := ioutil.TempFile("/tmp", "dls-key.")
outFile, err := os.CreateTemp("/tmp", "dls-key.")
if err != nil {
return
}
@ -70,12 +69,12 @@ genLoop:
return
}
privKey, err = ioutil.ReadFile(outPath)
privKey, err = os.ReadFile(outPath)
if err != nil {
return
}
pubKey, err = ioutil.ReadFile(outPath + ".pub")
pubKey, err = os.ReadFile(outPath + ".pub")
if err != nil {
return
}