Replace ioutil.ReadFile with os.ReadFile, fix chat set [[:space:]] in regexp

This commit is contained in:
eleksir
2023-06-14 01:08:24 +03:00
parent 747ff1454e
commit ac243bf4fd
4 changed files with 10 additions and 13 deletions

View File

@@ -2,7 +2,6 @@ package main
import (
"fmt"
"io/ioutil"
"os"
"strings"
@@ -50,7 +49,7 @@ func main() {
// "Заглатывать" файл целиком - плохая практика, но мы предополагаем, что файлы будут небольшие.
fortuneFile := fmt.Sprintf("%s/%s", srcDir, file.Name())
bytesRead, err := ioutil.ReadFile(fortuneFile)
bytesRead, err := os.ReadFile(fortuneFile)
if err != nil {
log.Errorf("Unable to read %s: %s\n", file.Name(), err)