mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-02 06:18:35 +00:00
Dedup code and migrate away from deprecated funcs (#1141)
Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user