Update to Go 1.19

This commit is contained in:
eikendev 2023-02-11 23:41:42 +01:00
parent 21a4d156e1
commit 2ddc0fbd74
No known key found for this signature in database
GPG key ID: A1BDB1B28C8EF694
12 changed files with 85 additions and 43 deletions

View file

@ -2,7 +2,7 @@ package api
import (
"encoding/json"
"io/ioutil"
"io"
"testing"
"github.com/gin-gonic/gin"
@ -44,7 +44,7 @@ func TestApi_CreateNotification(t *testing.T) {
// Parse body only for successful requests
if req.ShouldStatus >= 200 && req.ShouldStatus < 300 {
body, err := ioutil.ReadAll(w.Body)
body, err := io.ReadAll(w.Body)
require.NoErrorf(err, "Can not read request body")
err = json.Unmarshal(body, &notification)
require.NoErrorf(err, "Can not unmarshal request body")