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

Refactor code by simplifying it #136

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexandear
Copy link

The PR refactors code:

  • Change to use i++ instead of i = i + 1.
  • Use fmt.Fprint because fmt.Fprintf is not needed.
  • Add a whitespace between // and a sentence.
  • Remove //------------------------------------------------------------------- lines.
  • Use switch instead of long if-else-if to increase readability.
  • Use s != "" instead of len(s) > 0 because the first is more idiomatic.
  • Combine func parameters.

@alexandear alexandear requested a review from a team as a code owner December 2, 2024 15:03
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