Repository navigation
v0.2.1
This release focuses on robustness, developer experience, and error handling. It introduces new helper functions, improves error handling throughout the codebase, and simplifies the API by moving some functionality to helper functions.
Added
- New helper functions for common batch processing tasks:
CollectErrorsfor collecting errors from an error channel into a slice.RunBatchAndWaitfor running a batch and waiting for completion in one step.ExecuteBatchesfor running multiple batches concurrently and collecting all errors.
- Comprehensive handling of edge cases:
- Proper handling of nil processors, which are now filtered out automatically.
- Proper error handling for nil sources and sources returning nil channels.
- Detection and handling of very small time values.
- Support for empty item slices and zero configuration values.
- Extensive test coverage for all edge cases and error scenarios.
- Better documentation and examples for all public APIs.
- Improved documentation comments throughout the codebase following Go standards:
- Complete sentences with proper punctuation.
- Comments begin with the entity name being documented.
- Consistent formatting for code blocks and examples.
- Detailed documentation for struct fields, methods, and interfaces.
Changed
- Simplified API by removing the
Batch.Wait()method in favor of theRunBatchAndWaithelper function. - Improved error reporting with more specific error messages.
- Enhanced error handling throughout the codebase for better diagnostics.
- Better context cancellation support and testing.
- Code structure reorganized to be more maintainable and testable.
Fixed
- Fixed critical bug where items remaining in the pipeline would not be processed if fewer than MinItems when the source was exhausted.
- Fixed potential issues with nil sources and nil processors.
- Fixed handling of timing-dependent tests to make them more reliable.
- Fixed error handling to properly identify and wrap errors from different sources.
- Improved synchronization in concurrent processing scenarios.