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
Cut Data Warehouse Costs up to 54% with BigQuery Icon
Cut Data Warehouse Costs up to 54% with BigQuery

Migrate from Snowflake, Databricks, or Redshift with free migration tools. Exabyte scale without the Exabyte price.

BigQuery delivers up to 54% lower TCO than cloud alternatives. Migrate from legacy or competing warehouses using free BigQuery Migration Service with automated SQL translation. Get serverless scale with no infrastructure to manage, compressed storage, and flexible pricing—pay per query or commit for deeper discounts. New customers get $300 in free credit.
Try BigQuery Free
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

3 hours ago