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

Minor code improvements #1

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Minor code improvements #1

wants to merge 6 commits into from

Conversation

flrdv
Copy link

@flrdv flrdv commented Aug 18, 2022

  • Improved codestyle, for example, removed empty lines where they should not be, added where they should be
  • Removed some commented code
  • Removed pass-by-reference where it is not compulsory
  • Minor naming changes, for example, quoteEscaper renamed to quoteEscapists because it's more correct form imho

removed useless newlines where you don't need them, removed pass-by-reference where you also don't need, renamed all the receivers to cl (for consistency)
idk what's going on here, goland did it by itself
replaced string literals with http.MethodXxx in methods predicates, fixed returning nil-filled structure even in case error occurred, removed deferred closing readers by saving all the readers into a single slice of readers and closing them after for-loop. This is done because goland complains that this is a possible space leak (I trust him)
just removed empty returns with actual values, it's easier to understand
just renamed quoteEscaper -> quoteEscapists, because -er postfix usually interfaces have; escapists is a better form here IMHO
goland swapped spaces with tabs - I appreciate it, it's our codestyle. In filenames, swapped backslash with just a slash. Windows will anyway understand that, but my macOS does not, so ordinary slash is preferred
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