mirror of
https://github.com/OliveTin/OliveTin
synced 2026-08-28 05:26:29 +00:00
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:
@@ -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 */")
|
||||
|
||||
Reference in New Issue
Block a user