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

Refactor Templatelookup package #2140

Open
5 tasks
Tracked by #1638
medmes opened this issue Dec 19, 2024 · 0 comments
Open
5 tasks
Tracked by #1638

Refactor Templatelookup package #2140

medmes opened this issue Dec 19, 2024 · 0 comments

Comments

@medmes
Copy link
Member

medmes commented Dec 19, 2024

Description

The template_lookup package contains methods and logic for handling module templates and converting them into Module objects(DTOs). While refactoring the AvailableModule into ModuleInfo type for better clarity (as outlined in #1638), it became evident that further improvements could be made to enhance the overall readability and usability of the template_lookup package.

Specifically, the Parser struct, and its methods, such as GenerateModulesFromTemplates and GenerateMandatoryModulesFromTemplates, have significant room for optimization. These methods currently combine responsibilities such as resolving templates, creating manifests, and handling errors, leading to complex and less maintainable code.

Proposed Improvement

Acceptance Criteria

  • Refactor templatelookup pacakge:
    • Add UnManaged field into the moduleinfo struct (ModuleInfo_test.go)
  • Refactor the Parser struct and its methods for better modularity, readability, and maintainability.
  • Introduce meaningful naming conventions for all DTOs and helper functions.
  • Provide documentation or comments for new/refactored methods.
@medmes medmes mentioned this issue Dec 19, 2024
3 tasks
@medmes medmes changed the title If good new ideas can be gained here to improve the template_lookup pkg please create new issues for it! Refactor Templatelookup package Dec 19, 2024
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

No branches or pull requests

1 participant