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

style: simplify shouldIgnore #126

Merged
merged 1 commit into from
Feb 10, 2022

Conversation

ag9920
Copy link

@ag9920 ag9920 commented Feb 8, 2022

Just simplify some code, no real logic update.

  • Reduce the length of shouldIgnore function to one line.
  • Add name for returned variable in TypeConverter to make it more understandable.
  • Replace errors.New with defined ErrFieldNameTagStartNotUpperCase in errors.go.
  • Early return in set function, to avoid the long if from.IsValid() statement.

@jinzhu jinzhu merged commit 7948fe2 into jinzhu:master Feb 10, 2022
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.

2 participants