mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
Remove remaining uses of ioutil
This commit is contained in:
parent
3c0e640601
commit
056e97d930
4 changed files with 9 additions and 11 deletions
|
|
@ -10,7 +10,7 @@ import (
|
|||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
|
@ -107,7 +107,7 @@ func (as *AppService) PutTransaction(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
defer r.Body.Close()
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
body, err := io.ReadAll(r.Body)
|
||||
if err != nil || len(body) == 0 {
|
||||
Error{
|
||||
ErrorCode: ErrNotJSON,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue