Draft
Conversation
- Add local dependency with replace directive in go.mod - Replace individual model initialization with unified ScanossModels wrapper - Update AllUrlsModel to use shared helper functions for component selection - Replace local pickOneUrl implementation with helpers.PickOneURL - Add interface adapter for ProjectModel to support helpers.ProjectRepository - Update GolangProjects model to use shared library types and helpers - Add conversion functions between local and shared AllURL types - Fix nil pointer handling for optional project repository - All tests passing with shared library integration This integration eliminates code duplication and provides unified PURL-based logic across SCANOSS services while maintaining backward compatibility.
- Remove duplicated Project, Version, License, Mine models (4 files) - Remove corresponding test files (4 test files) - Update all_urls.go to use shared library ProjectModel and helpers - Update golang_projects.go to use shared library model constructors - Update test files to use shared library imports and constructors - All tests passing with 8 files removed (~500+ lines eliminated) This completes the cleanup phase by removing code duplication while preserving all functionality through the shared library integration. Dependencies service now properly uses go-models-helper for all basic models.
- Remove remaining duplicated AllUrls model (218 lines) - Remove remaining duplicated GolangProjects model (218+ lines) - Remove corresponding test files (4 additional test files) - Dependencies service now uses shared library models directly - No local model wrappers or conversion functions needed - All tests passing with complete shared library integration Total cleanup: 12 model files removed, ~1500+ lines of duplicated code eliminated. Dependencies service now has zero model duplication with other SCANOSS services.
- Simplified NewDependencies constructor to accept only models parameter - Moved models creation to service layer for proper request-scoped instances - Updated DependencyUseCase struct to remove redundant fields (logger, conn) - Added Logger() getter method to ScanossModels for clean access - Each request now gets fresh models instance with request-specific logger - Improved scalability and separation of concerns - All tests passing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
No description provided.