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

Fix RenameProject method signature in Project Repository interface #35

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

Conversation

jasonuc
Copy link

@jasonuc jasonuc commented Oct 24, 2024

This PR addresses an inconsistency between the Repository interface and the GormRepository implementation.

Changes:

  • Renamed id to projectID in GormRepository's RenameProject method.
  • Changed RenameProject in Repository interface from RenameProject(projectID uint) error to RenameProject(projectID uint, name string) error.

The method in the GormRepository struct was designed to take two arguments (id and name), while the Repository interface defined it to take only one (projectID). Although this didn't prevent functionality, it created inconsistency between the interface and implementation. Updating the interface makes them consistent, improving overall code readability and maintainability.

Changed the RenameProject method in the Repository interface to accept two arguments (id and name) instead of one.
This change aligns the interface with the actual implementation in GormRepository.
Changed the parameter name 'id' to 'projectID' for clarity and consistency.
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