mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-01 19:32:27 +08:00
chore (refactoring): replace ioutil with io - #847
This commit is contained in:
@ -4,7 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
. "github.com/mickael-kerjean/filestash/server/common"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
@ -12,7 +12,7 @@ import (
|
||||
func BodyParser(fn HandlerFunc) HandlerFunc {
|
||||
extractBody := func(req *http.Request) (map[string]interface{}, error) {
|
||||
body := map[string]interface{}{}
|
||||
byt, err := ioutil.ReadAll(req.Body)
|
||||
byt, err := io.ReadAll(req.Body)
|
||||
if err != nil {
|
||||
return body, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user