Feature user register rebase#8
Merged
Merged
Conversation
Exported variables should be named using PascalCase. Since I used `GORM` for modeling, I need a database connection. It uses `sql.DB` under the hood, so when I close `sql.DB`, I automatically close the `GORM` connection as well.
This is quite a large commit—sorry about that! That said, most of the changes are related to restructuring the folder layout, which I believe is a crucial improvement. I’ve decided to stop overthinking the project structure and went with something scalable, even if it's a bit overkill for now. I’ll explain more in the PR description. Also, I’ve introduced error handling via middleware.
- I also tried to improve error handling. - Typo: `ErrUserExists` → `ErrUsernameExists`
We could add a backoff, but I think it's smarter to keep retrying indefinitely without delay, since we want all services to start as soon as possible.
I made this change based on our specification, as we likely won’t need more than one service or repository.
I was unsure about the `Register` handler and decided to make it lowercase, as I currently don’t see a reason to export it. Integration tests will likely be performed via API calls.
magley
approved these changes
Jul 27, 2025
magley
left a comment
Member
There was a problem hiding this comment.
Good job. I don't get why we have to keep a linear history, though...
Member
Author
For simplicity, I guess. As you can see, all commits from this PR changed their hashes after merging into the develop branch. This is a bad property for tracking because we often mention commits (especially fix commits) during PR reviews. Also, a linear commit history can change hashes for commits that happened in parallel (different branches) during the same time period. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3.
This PR resolves the
rebaseproblem that occurred in #7.For more details, see #7.