Fix static tests

This commit is contained in:
2025-02-05 18:58:00 +00:00
parent 4a4b24fa45
commit 3d89a77565
4 changed files with 5 additions and 30 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ package gql
import (
"encoding/json"
"io/ioutil"
"io"
"net/http"
"net/http/httptest"
"strings"
@@ -15,7 +15,7 @@ func StartMockServer() *httptest.Server {
// Create your handler
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// Your existing handler code
bodyBytes, err := ioutil.ReadAll(r.Body)
bodyBytes, err := io.ReadAll(r.Body)
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
return