Skip to content

Commit

Permalink
chore: return values
Browse files Browse the repository at this point in the history
  • Loading branch information
mieliespoor committed Jun 14, 2023
1 parent 0b5e242 commit 447ac78
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (c Client) newRequest(ctx context.Context, method, path string, options ...

type requestOption func(*http.Request) error

func (c Client) doRequest(req *http.Request, v interface{}) (a apiResponse, err error) {
func (c Client) doRequest(req *http.Request, v interface{}) (resp apiResponse, err error) {
if c.debug {
reqDump, _ := httputil.DumpRequestOut(req, true)
log.Printf("sending request:\n>>>>>>\n%s\n>>>>>>\n", string(reqDump))
Expand Down Expand Up @@ -126,8 +126,9 @@ func (c Client) doRequest(req *http.Request, v interface{}) (a apiResponse, err
}
}

a, err = c.newAPIResponse(res)
return
resp, err = c.newAPIResponse(res)

return resp, err
}

type apiResponse struct {
Expand Down

0 comments on commit 447ac78

Please sign in to comment.