chore: remove refs to deprecated io/ioutil (#309)

Signed-off-by: guoguangwu <guoguangwug@gmail.com>
Co-authored-by: James Read <contact@jread.com>
This commit is contained in:
guangwu
2024-05-13 15:20:58 +00:00
committed by GitHub
co-authored by James Read
parent 9d33e62d34
commit 7e34efd453
5 changed files with 10 additions and 13 deletions
+1 -2
View File
@@ -4,7 +4,6 @@ import (
"encoding/json"
// cors "github.com/OliveTin/OliveTin/internal/cors"
log "github.com/sirupsen/logrus"
"io/ioutil"
"net/http"
"os"
"path"
@@ -89,7 +88,7 @@ func generateThemeCss(w http.ResponseWriter, r *http.Request) {
customThemeCssRead = true
if _, err := os.Stat(themeCssFilename); err == nil {
customThemeCss, err = ioutil.ReadFile(themeCssFilename)
customThemeCss, err = os.ReadFile(themeCssFilename)
} else {
log.Debugf("Theme CSS not read: %v", err)
customThemeCss = []byte("/* not found */")