Skip to content

Commit

Permalink
chore: more clarity comment (#4)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: ionling <soarvision@outlook.com>
  • Loading branch information
puqiulin and ionling committed Jan 24, 2024
1 parent f53a4a5 commit 78e8ed3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func NewJSONRequest(ctx context.Context, method, url string, data any,
return
}

// RespJSON unmarshals the response body into a new R and closes the body afterwards.
// RespJSON unmarshals the response body into a new 'R' and then closes the body.
func RespJSON[R any](r *http.Response) (res *R, err error) {
defer r.Body.Close()
bs, err := io.ReadAll(r.Body)
Expand Down

0 comments on commit 78e8ed3

Please sign in to comment.