-
Notifications
You must be signed in to change notification settings - Fork 1
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: logger service->lib으로 이동 #3
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
results | ||
judger.log | ||
log | ||
logs | ||
logs | ||
.idea* | ||
/go.work.sum |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FeedbackOverall, the PR effectively accomplishes moving the
Example: import (
"context"
"fmt"
"time"
"github.com/cranemont/iris/lib/logger"
"github.com/cranemont/iris/src/router"
amqp "github.com/rabbitmq/amqp091-go"
) SummaryGenerally, this PR is well-executed and moves the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The refactoring to move the logger service to the Code Analysis & Suggestions:
Sample Organized Import Section:Before: import (
"context"
"github.com/cranemont/iris/lib/logger"
"net/http"
"os"
"strconv"
"time"
"github.com/cranemont/iris/src/handler"
"github.com/cranemont/iris/src/router"
"github.com/cranemont/iris/src/service/file"
"github.com/cranemont/iris/src/service/sandbox"
"github.com/cranemont/iris/src/service/testcase"
"github.com/cranemont/iris/src/utils"
) After: import (
"context"
"net/http"
"os"
"strconv"
"time"
"github.com/cranemont/iris/lib/logger"
"github.com/cranemont/iris/src/handler"
"github.com/cranemont/iris/src/router"
"github.com/cranemont/iris/src/service/file"
"github.com/cranemont/iris/src/service/sandbox"
"github.com/cranemont/iris/src/service/testcase"
"github.com/cranemont/iris/src/utils"
) Final StepPlease ensure you run all tests and a linter on the code to catch any further issues. This will help maintain code quality and consistency. With these changes, the PR will improve in terms of code quality, readability, and maintainability. Good work, and looking forward to the updated PR! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FeedbackOverall Comment: Specific Comments:
In conclusion, the move to centralize the logger service is correctly implemented with proper updates to import paths across multiple files. A few improvements can be made to clean up formatting while maintaining consistency. Great job overall! :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Review CommentsPR Title and Description
Code Diff ReviewThe code changes in the diff are mostly related to moving the General Comments:
.gitignore+logs
+.idea*
+/go.work.sum
main.go- "github.com/cranemont/iris/src/service/logger"
+ "github.com/cranemont/iris/lib/logger"
Indentation and Spacing
Factory File:Ensure that no unnecessary imports are left, even during major refactor: - "github.com/cranemont/iris/src/service/logger"
+ "github.com/cranemont/iris/lib/logger" Error Handling:
Next Steps
Overall, the PR looks good, and the changes make sense for modularizing the code and ensuring that common functionalities are managed from a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FeedbackSummaryOverall, the PR correctly relocates the common logger service from Detailed Feedback
Action Items
This PR moves the logger service to a common There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code Review FeedbackSummary:The PR aims to move the logger service to a common location ( Detailed Feedback:
By implementing these suggestions, you can further ensure clarity, maintainability, and efficiency of the codebase. Great job on effectively refactoring and relocating the logger service! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. General FeedbackThe refactor to move the logger service to a common Specific Feedback
SummaryGreat job on making the logger service more modular by moving it to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FeedbackOverall, the PR successfully relocates the logger service to a common
Sample Code Snippet after Improvements: // src/router/router.go
import (
"encoding/json"
"fmt"
"github.com/cranemont/iris/lib/logger" // Common logger moved to lib
"github.com/cranemont/iris/src/handler"
) Conclusion: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Feedback on the PROverall, this PR successfully moves the logger service to a common library, adhering to the strategy described in the PR title and description. The changes to the import paths and the refactoring of the
SummaryThe PR correctly achieves its objective of moving the logger to a common library. Addressing the minor formatting, import grouping, documentation, and testing considerations will help ensure the quality and maintainability of the codebase. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Review FeedbackPR Title
PR Description
PR Diff
Commit Messages
General Suggestions
These changes can help make the codebase cleaner and more maintainable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FeedbackOverall, the PR aims to refactor the project by moving the 1.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feedback on PR
Summary
The PR intends to refactor the code by moving the
logger
service from theservice
directory to a newlib
directory because it is a common utility used across the project.Positive Changes
logger
package has been relocated, and all import paths have been adjusted accordingly..gitignore
file has been updated to avoid new unnecessary files from being committed.Suggested Improvements
Consistency in Directory Naming: Consider following a consistent language in directory naming. For instance, the rest of the project uses
src
, whilelib
does not follow the same pattern. It might make sense to usesrc/lib
for consistency.Documentation:
Testing:
IDE/Editor Configurations in .gitignore:
.idea*
entry in the.gitignore
file suggests the presence of IDE-specific settings (likely from JetBrains IDEs). Consider organizing these in a separate section specifically for editor configurations to make it easier to manage and understand.Suggested
.gitignore
section for clarity:Conclusion
The changes are overall well-implemented and are a clear improvement in organizing the common utility functions. Addressing the suggestions above will further improve code maintainability and clarity.