Dedup code and migrate away from deprecated funcs (#1141)

Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
6543
2022-08-30 01:14:07 +02:00
committed by GitHub
parent ca84f703e3
commit 08a99152d6
25 changed files with 86 additions and 113 deletions

View File

@@ -2,8 +2,8 @@ package web
import (
"embed"
"io"
"io/fs"
"io/ioutil"
"net/http"
)
@@ -26,7 +26,7 @@ func Lookup(path string) (buf []byte, err error) {
}
defer file.Close()
buf, err = ioutil.ReadAll(file)
buf, err = io.ReadAll(file)
if err != nil {
return nil, err
}