diff --git a/backend/app/api/handlers/v1/v1_ctrl_qrcode.go b/backend/app/api/handlers/v1/v1_ctrl_qrcode.go index d8e83a5..de45543 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_qrcode.go +++ b/backend/app/api/handlers/v1/v1_ctrl_qrcode.go @@ -4,7 +4,6 @@ import ( "bytes" "image/png" "io" - "io/ioutil" "net/http" "github.com/hay-kot/homebox/backend/internal/sys/validate" @@ -55,7 +54,7 @@ func (ctrl *V1Controller) HandleGenerateQRCode() server.HandlerFunc { io.Closer }{ Writer: w, - Closer: ioutil.NopCloser(nil), + Closer: io.NopCloser(nil), } qrwriter := standard.NewWithWriter(toWriteCloser, standard.WithLogoImage(image)) diff --git a/scripts/process-types/main.go b/scripts/process-types/main.go index 59c2530..06e3ec7 100644 --- a/scripts/process-types/main.go +++ b/scripts/process-types/main.go @@ -2,7 +2,6 @@ package main import ( "fmt" - "io/ioutil" "os" "regexp" ) @@ -31,7 +30,7 @@ func main() { } text := "/* post-processed by ./scripts/process-types.go */\n" - data, err := ioutil.ReadFile(path) + data, err := os.ReadFile(path) if err != nil { fmt.Println(err) os.Exit(1) @@ -63,7 +62,7 @@ func main() { text = regex.ReplaceAllString(text, replace) } - err = ioutil.WriteFile(path, []byte(text), 0644) + err = os.WriteFile(path, []byte(text), 0644) if err != nil { fmt.Println(err) os.Exit(1)