Closed sweep-ai[bot] closed 5 months ago
Latest commit: 58f83b81140f446e1b33057c3bf24946112f54ee
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
PR Feedback (click)
I created this PR to address this rule:
"Variable and function names should be meaningful and descriptive."
Description
This PR improves the variable naming in the
lua/hurl/main.lua
file of thehurl.nvim
repository. The variablehead_state
has been renamed toresponse_state
to provide a more descriptive name that accurately reflects its purpose in the code.Summary of Changes
head_state
toresponse_state
throughout thelua/hurl/main.lua
file.head_state
variable toresponse_state
.if head_state == 'body'
toif response_state == 'body'
.head_state = 'start'
toresponse_state = 'start'
.elseif head_state == 'body'
toelseif response_state == 'body'
.local key, value = string.match(line, '([%w-]+):%s*(.+)')
tolocal key, value = string.match(line, '([%w-]+):%s*(.+)')
.response.body = response.body .. line
toresponse.body = response.body .. line
.'hurl: response status ' .. response.status
to'hurl: response status ' .. response.status
.'hurl: response headers ' .. vim.inspect(response.headers)
to'hurl: response headers ' .. vim.inspect(response.headers)
.'hurl: response body ' .. response.body
to'hurl: response body ' .. response.body
.Please review and merge this PR to improve the variable naming in the
lua/hurl/main.lua
file.