From 9ee54e3e82e92669775eadabaa0c743d74482729 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 14 May 2021 01:57:32 +0400 Subject: Fixed issue with io.ReadAll being undefined when cross-compiling with fyne-cross tool. --- http-client/client.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'http-client/client.go') diff --git a/http-client/client.go b/http-client/client.go index d448b8c..57c4fad 100644 --- a/http-client/client.go +++ b/http-client/client.go @@ -7,7 +7,7 @@ import ( "errors" "fmt" "fyne.io/fyne/v2/data/binding" - "io" + "io/ioutil" "net/http" "strings" "sync" @@ -78,7 +78,7 @@ func register(user UserData, serverKey string) (Response, error) { return resp, err } - body, _ := io.ReadAll(httpResp.Body) + body, _ := ioutil.ReadAll(httpResp.Body) _ = json.Unmarshal(body, &resp) if httpResp.StatusCode == http.StatusOK { @@ -98,7 +98,7 @@ func tryAuth(user UserData) (bool, error) { return false, err } - body, _ := io.ReadAll(httpResp.Body) + body, _ := ioutil.ReadAll(httpResp.Body) _ = json.Unmarshal(body, &resp) if httpResp.StatusCode == http.StatusOK { @@ -118,7 +118,7 @@ func getUserKey(user UserData, checkedUser string) (string, error) { return "", err } - body, _ := io.ReadAll(httpResp.Body) + body, _ := ioutil.ReadAll(httpResp.Body) _ = json.Unmarshal(body, &resp) if httpResp.StatusCode == http.StatusOK { @@ -170,7 +170,7 @@ func runClient(user UserData) { lastPoll = time.Now().UnixNano() if httpResp.StatusCode == http.StatusOK { - body, _ := io.ReadAll(httpResp.Body) + body, _ := ioutil.ReadAll(httpResp.Body) var resp Response _ = json.Unmarshal(body, &resp) var signedMessages []string @@ -207,7 +207,7 @@ func runClient(user UserData) { storage.Unlock() } else { fmt.Println(httpResp.StatusCode) - ae, _ := io.ReadAll(httpResp.Body) + ae, _ := ioutil.ReadAll(httpResp.Body) fmt.Println(string(ae)) } -- cgit v1.2.3