Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/whitespace #312

Open
wants to merge 8 commits into
base: primary
Choose a base branch
from
Open

Chore/whitespace #312

wants to merge 8 commits into from

Conversation

aslak01
Copy link

@aslak01 aslak01 commented Jan 15, 2025

This PR contains mostly nits from the stricter gofumpt go formatter about whitespace and error formatting without initial Uppercase and ending punctuation, and a couple changes from snake_case and SCREAMING_SNAKE_CASE to camelCase as it recommends.

It also has some more concise variable declaration changes, probably in part due to new syntax since the code was originally written, and some stylistic gofumpt changes.

Nothing here should affect anything in the actual running of the code (with one exception which I will make a comment about), but in my opinion it makes the code more internally consistent and easier to read as a human consumer of it.

Edit: Once committed, this PR's hash should be added to .git-blame-ignore-revs to still show who made the original code and not hide it with formatting changes.

Comment on lines -117 to +115
return root, errors.New(fmt.Sprintf("trying to write a value with type `%v` to a key without depth.", key))
return root, fmt.Errorf("trying to write a value with type `%v` to a key without depth", key)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has some potential runtime implications, the change is implemented according to the lsp/linter recommendations, but I'm not sure if there was a reason for the old way it was written.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant