Remove remaining uses of ioutil

This commit is contained in:
Tulir Asokan 2023-02-04 15:36:42 +02:00
commit 056e97d930
4 changed files with 9 additions and 11 deletions

View file

@ -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,