refactor: Remove remaining uses of depreciated package io/ioutil (#837)

This commit is contained in:
Dave 2023-07-30 07:23:43 -04:00 committed by GitHub
parent 6151ea1c4d
commit 8e8d474ae8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 8 deletions

View file

@ -4,7 +4,6 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strconv"
@ -105,7 +104,7 @@ func ImageEndpoint(cm *config.ConfigLoader, o *options.Option) func(c *fiber.Ctx
tempDir = o.ImageDir
}
// Create a temporary file
outputFile, err := ioutil.TempFile(tempDir, "b64")
outputFile, err := os.CreateTemp(tempDir, "b64")
if err != nil {
return err
}