1
0
Fork 0
mirror of https://github.com/Luzifer/gen-dockerfile.git synced 2024-12-19 18:21:18 +00:00

Lint: replace deprecated function calls

This commit is contained in:
Knut Ahlers 2024-11-22 13:53:25 +01:00
parent 37f4c44dff
commit d6f669638d
Signed by: luzifer
SSH key fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E

View file

@ -4,7 +4,6 @@ import (
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"regexp"
@ -107,7 +106,7 @@ func main() {
var output io.Writer = os.Stdout
if cfg.Diff {
displayDiff(buf)
output = ioutil.Discard
output = io.Discard
}
if cfg.Write {
@ -130,7 +129,7 @@ func displayDiff(buf *bytes.Buffer) {
)
if _, err := os.Stat("Dockerfile"); err == nil {
oldDockerfile, err = ioutil.ReadFile("Dockerfile")
oldDockerfile, err = os.ReadFile("Dockerfile")
if err != nil {
log.WithError(err).Fatal("Could not read existing Dockerfile")
}