Skip to content

Conversation

Degfy
Copy link
Member

@Degfy Degfy commented May 17, 2025

  • Supports injected name with wildcards
  • Add more test cases, 100% coverage

dapeng added 16 commits May 12, 2025 13:03
- Remove mock package and related generated code
- Refactor core to use new interfaces and improve modularity
- Update use cases to reflect new core structure
- Add new helper functions for dependency analysis and injection
- Refactor core to better handle named and unnamed dependencies
- Implement support for optional dependencies with allowNil option
- Add error handling for unsupported types
- Improve logic for selecting default dependencies
- Update tests to cover new functionality
- Correct default type handling for interfaces and named providers
- Update type checking logic for interface compatibility
- Fix named provider behavior with default types
- Add comprehensive test cases for type compatibility scenarios
- Improve error messages for type mismatch situations
- Add additional pattern to ignore mock files in codecov
- Simplify condition in filedHasOption function
- Update forceReplace logic to check for non-empty name
- Implement equality check based on coffin name instead of reference
- Add comprehensive unit tests for keeper functionality
- Test cases cover various scenarios including error handling and forceReplace
- Add unit tests for injectFieldAsSlice, injectFieldAsNotSlice, fillOne, doBeforeInit, and safeInitOne methods
- Implement test cases for various scenarios including error handling and successful injections
- Use mock objects to isolate the installer methods from external dependencies
- Add unit tests for Flag.goneFlag method
- Implement tests for actionType.String method
- Create tests for dependency.String method
- Add unit tests for filedHasOption function- Extend option_test.go with tests for IsDefault function
- Implement selectOneCoffin method in keeper to centralize goner selection logic
- Add unit tests for selectOneCoffin to cover different scenarios
- Update core and core_dep_analyzer to use the new selectOneCoffin method
- Add tests for GetGonerByName, GetGonerByType, and InjectStruct in core_test.go- Remove unnecessary defaultTypeMap assignment in coffin.go
- Simplify injectBefore and injectAfter logic
- Enhance nil value handling for interface and pointer types
- Add comprehensive tests for function injection scenarios
- Refactor experimental.go to improve error handling
- Add unit tests for core.Check method
- Add unit tests for core.Install method
- Use mocking to isolate dependencies
- Cover various scenarios including error cases and success cases
- Update Run function to accept variadic arguments
- Add tests for Prepare and End functions
- Enhance circular dependency detection in core_dep_analyzer
- Add error handling tests for dependence analyzer
- Improve test coverage for experimental features
- Add tests for iface testFlag and install function
- Add test cases for invalid integer and float formats
- Update existing test cases for better coverage
- Refactor some code for improved error handling and readability
- Add tests for Level(), Debugf(), and SetLevel() methods
- Cover various scenarios including different log levels and edge cases
- Improve test coverage for the logger package
- Change the test case for unknown log level from 0 to 4
- Ensure that the test now checks for "info" level instead of "debug"
- Add test for LoadFunc feature
- Add test for wildcard usage in dependency injection- Update version to v2.2.0
- Add detailed explanation of dependency injection concepts
- Include examples of struct and function parameter injection
- Describe different types of injection and their use cases- Explain object loading methods in Gone framework
- Update manual injection examples
Copy link

codecov bot commented May 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
application.go 100.00% <100.00%> (+4.38%) ⬆️
coffin.go 100.00% <100.00%> (ø)
core.go 100.00% <100.00%> (+10.00%) ⬆️
core_dep_analyzer.go 100.00% <100.00%> (ø)
core_installer.go 100.00% <100.00%> (ø)
core_keeper.go 100.00% <100.00%> (ø)
core_loader.go 100.00% <100.00%> (ø)
experimental.go 100.00% <100.00%> (+12.50%) ⬆️
help.go 100.00% <100.00%> (ø)
iface.go 100.00% <100.00%> (ø)
... and 2 more

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Degfy Degfy merged commit e948f8a into main May 17, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant