Remove dependency of deprecated ioutil package
This commit is contained in:
@@ -3,8 +3,8 @@ package server
|
||||
import (
|
||||
"encoding/json"
|
||||
"html/template"
|
||||
"io"
|
||||
"io/fs"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
@@ -82,7 +82,7 @@ func getIndexTemplate(r *http.Request, fs fs.FS) (*template.Template, error) {
|
||||
log.Error(r, "Could not find `index.html` template", err)
|
||||
return nil, err
|
||||
}
|
||||
indexStr, err := ioutil.ReadAll(indexHtml)
|
||||
indexStr, err := io.ReadAll(indexHtml)
|
||||
if err != nil {
|
||||
log.Error(r, "Could not read from `index.html`", err)
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user