diff options
| author | Shulhan <ms@kilabit.info> | 2024-01-25 19:32:48 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-01-25 19:45:46 +0700 |
| commit | 099ccef4614d8b3ba19f44c50ef984631d161240 (patch) | |
| tree | a31565d4ec4cc911735c086c35da8d89d689ac3e /run_response.go | |
| parent | 7d3ce2ca01f2d4954d89430e48ca23c89416668b (diff) | |
| download | gorankusu-099ccef4614d8b3ba19f44c50ef984631d161240.tar.xz | |
all: fix warnings recommended by linter revive
Most of the fixes related to naming variables with acronyms, for example
HTTP, JSON, URL, and so on.
Diffstat (limited to 'run_response.go')
| -rw-r--r-- | run_response.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/run_response.go b/run_response.go index 9df7671..0586c6e 100644 --- a/run_response.go +++ b/run_response.go @@ -25,20 +25,20 @@ type RunResponse struct { ResponseStatusCode int } -// SetHttpRequest dump the HTTP request including body into the DumpRequest +// SetHTTPRequest dump the HTTP request including body into the DumpRequest // field. -func (rres *RunResponse) SetHttpRequest(req *http.Request) (err error) { +func (rres *RunResponse) SetHTTPRequest(req *http.Request) (err error) { rres.DumpRequest, err = httputil.DumpRequest(req, true) if err != nil { - return fmt.Errorf("SetHttpRequest: %w", err) + return fmt.Errorf(`SetHTTPRequest: %w`, err) } return nil } -// SetHttpResponse dump the HTTP response including body into the DumpResponse +// SetHTTPResponse dump the HTTP response including body into the DumpResponse // field. -func (rres *RunResponse) SetHttpResponse(res *http.Response) (err error) { - logp := "SetHttpResponse" +func (rres *RunResponse) SetHTTPResponse(res *http.Response) (err error) { + var logp = `SetHTTPResponse` rres.ResponseStatus = res.Status rres.ResponseStatusCode = res.StatusCode |
