do - Dependency Injection is a lightweight dependency injection toolkit for Go that implements the DI pattern using the language’s generics system to provide strong type safety and minimal runtime overhead. The library offers a service container that allows developers to register, resolve, and manage application dependencies in a structured and maintainable way. It supports multiple service lifecycles such as eager, lazy, and transient loading, along with circular dependency detection and interface binding. The toolkit is designed to improve modularity, testability, and scalability in Go applications by reducing tight coupling between components. It also includes lifecycle management features like health checks and graceful shutdown handling, making it suitable for production services and microservices. Overall, samber/do delivers a modern, generics-powered alternative to traditional reflection-based DI frameworks in Go.

Features

  • Type-safe dependency injection container
  • Service registration by type or name
  • Lazy eager and transient lifecycles
  • Circular dependency detection
  • Health check and graceful shutdown
  • Dependency graph resolution

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow do - Dependency Injection

do - Dependency Injection Web Site

Other Useful Business Software
$300 in Free Credit for Your Google Cloud Projects Icon
$300 in Free Credit for Your Google Cloud Projects

Build, test, and explore on Google Cloud with $300 in free credit. No hidden charges. No surprise bills.

Launch your next project with $300 in free Google Cloud credit—no hidden charges. Test, build, and deploy without risk. Use your credit across the Google Cloud platform to find what works best for your needs. After your credits are used, continue building with free monthly usage products. Only pay when you're ready to scale. Sign up in minutes and start exploring.
Start Free Trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of do - Dependency Injection!

Additional Project Details

Programming Language

Go

Related Categories

Go Libraries

Registered

2 days ago