Changelog
All notable changes to godi will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
Added
Nothing yet
Changed
Nothing yet
Deprecated
Nothing yet
Removed
Nothing yet
Fixed
Nothing yet
Security
Nothing yet
[1.0.0] - 2025-01-15
Added
Initial release of godi
Microsoft-style dependency injection for Go
Three service lifetimes: Singleton, Scoped, and Transient
Type-safe service resolution with generics
Keyed services for multiple implementations
Service groups for collections
Module system for organizing services
Comprehensive error handling
Service disposal with LIFO ordering
Request scoping for web applications
Parameter objects (In) and result objects (Out)
Service decoration support
Circular dependency detection
Automatic lifecycle management
Thread-safe operations
Context propagation through scopes
Service provider options for customization
Resolution callbacks for monitoring
Timeout support for service resolution
Panic recovery option
Dry run mode for validation
Features
Service Registration
AddSingleton- Register singleton servicesAddScoped- Register scoped servicesAddTransient- Register transient servicesDecorate- Add decorators to servicesReplace- Replace existing registrationsRemoveAll- Remove service registrations
Service Resolution
Resolve[T]- Type-safe generic resolutionResolveKeyed[T]- Type-safe keyed resolutionInvoke- Execute functions with DI
Scoping
CreateScope- Create service scopesAutomatic disposal of scoped services
Context propagation
Hierarchical scopes
Advanced Features
Module system for grouping services
Service groups for collections
Keyed services for variants
Parameter and result objects
Comprehensive error types
Lifecycle callbacks
Examples
Task management system (Getting Started)
Blog REST API (Web Application)
Test utilities and mocking (Testing)
Microservices architecture (Microservices)
Documentation
Comprehensive API reference
Tutorials for common scenarios
How-to guides for specific features
Best practices guide
Migration guide from other DI solutions
Version History
Versioning Policy
godi follows Semantic Versioning:
Major version (1.0.0): Breaking API changes
Minor version (1.1.0): New features, backward compatible
Patch version (1.0.1): Bug fixes, backward compatible
Compatibility
Requires Go 1.21 or later (for generics support)
Compatible with standard library
Zero external dependencies (except bundled uber/dig)
Future Releases
Planned features for future releases:
v1.1.0 (Planned)
Async service resolution
Service factories with parameters
Enhanced debugging tools
Performance optimizations
v1.2.0 (Planned)
Service middlewares
Dynamic service registration
Configuration integration
Health check integration
v2.0.0 (Future)
Simplified API
Better error messages
Enhanced performance
Additional lifetime options
Upgrading
From v0.x to v1.0.0
Version 1.0.0 is the first stable release. If you were using pre-release versions:
Update import paths if changed
Review breaking changes in API
Update service registrations to use new options
Test thoroughly before deploying
Breaking Changes
No breaking changes in v1.0.0 as it’s the initial release.
Support
Bug Reports: GitHub Issues
Feature Requests: GitHub Discussions
Security Issues: See SECURITY.md
Contributors
Junior Yono - Initial work and maintenance
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE file for details.