diff options
| author | Andrew <saintruler@gmail.com> | 2021-05-14 01:57:32 +0400 |
|---|---|---|
| committer | Andrew <saintruler@gmail.com> | 2021-05-14 01:57:32 +0400 |
| commit | 9ee54e3e82e92669775eadabaa0c743d74482729 (patch) | |
| tree | 65c4eeb0a908bd69967a14c304af4dcd2bbfbbb9 /http-client/client.go | |
| parent | f4c8eef1af781dfd5ef192520ba069eacd9f98cb (diff) | |
Fixed issue with io.ReadAll being undefined when cross-compiling with fyne-cross tool.
Diffstat (limited to 'http-client/client.go')
| -rw-r--r-- | http-client/client.go | 12 |
1 files changed, 6 insertions, 6 deletions
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)) } |