From d6f669638daa7f22d445993d3809eb7a4a6a041c Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 22 Nov 2024 13:53:25 +0100 Subject: [PATCH] Lint: replace deprecated function calls --- main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index e787b3c..70faa8b 100644 --- a/main.go +++ b/main.go @@ -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") }