Replaced ioutil calls

This commit is contained in:
Eduard Urbach 2024-03-15 09:31:57 +01:00
parent 95eea7d886
commit 54da8c1244
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0
2 changed files with 2 additions and 4 deletions

View File

@ -5,7 +5,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
@ -58,7 +57,7 @@ func (amv *AMV) TitleByUser(user *User) string {
func (amv *AMV) SetVideoReader(reader io.Reader) error {
fileName := amv.ID + ".webm"
pattern := amv.ID + ".*.webm"
file, err := ioutil.TempFile("", pattern)
file, err := os.CreateTemp("", pattern)
if err != nil {
return err

View File

@ -1,7 +1,6 @@
package arn
import (
"io/ioutil"
"os"
"path"
@ -93,7 +92,7 @@ func init() {
}
// Load API keys
data, err := ioutil.ReadFile(apiKeysPath)
data, err := os.ReadFile(apiKeysPath)
if err != nil {
panic(err)