response: Revert to using fields instead of methods

This commit is contained in:
Adnan Maolood
2021-02-24 18:50:39 -05:00
parent 867074d81b
commit 1bc5c68c3f
4 changed files with 38 additions and 56 deletions

View File

@@ -91,13 +91,13 @@ func TestReadWriteResponse(t *testing.T) {
// No response
continue
}
if resp.status != test.Status {
t.Errorf("expected status = %d, got %d", test.Status, resp.status)
if resp.Status != test.Status {
t.Errorf("expected status = %d, got %d", test.Status, resp.Status)
}
if resp.meta != test.Meta {
t.Errorf("expected meta = %s, got %s", test.Meta, resp.meta)
if resp.Meta != test.Meta {
t.Errorf("expected meta = %s, got %s", test.Meta, resp.Meta)
}
b, _ := ioutil.ReadAll(resp.body)
b, _ := ioutil.ReadAll(resp.Body)
body := string(b)
if body != test.Body {
t.Errorf("expected body = %#v, got %#v", test.Body, body)