A lightweight dependency injection framework for Go with tag-based auto injection, config center support, and rich ecosystem components.
Gone is a lightweight dependency injection framework for Go that uses Golang struct field tags to manage component dependencies through concise annotations. It simplifies building modular and maintainable applications by automating dependency resolution and lifecycle management, enabling developers to focus on business logic rather than boilerplate wiring.
Go developers building modular, maintainable applications who want to reduce boilerplate code for dependency management, particularly those working on services that require integrated configuration, logging, database, or LLM components.
Developers choose Gone for its tag-based auto-injection that supports private fields and configuration values, integrated lifecycle management with start/stop hooks, and a rich ecosystem of pre-built components (goner) for common needs like observability and databases, all emphasizing convention over configuration.
🚀 Gone - A Lightweight Dependency Injection Framework for Go | Tag-based Auto Injection | Supports Config Center/Lifecycle Management | Provides Rich Ecosystem Components and Scaffolding Tool
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses Golang struct tags like `gone:"*"` for automatic dependency injection, reducing boilerplate code as shown in the README example with private field support.
Provides Init(), start, and stop methods with hooks for automated service management, simplifying component orchestration without manual wiring.
Offers pre-built goner components for logging, database, LLM, and observability, accelerating development with ready-to-use modules from the goner repository.
Includes gonectl for project creation, code generation, and test mocking, streamlining setup and maintenance as demonstrated in the quick start guide.
Dependency resolution via tags occurs at runtime, which can hide misconfigurations or missing dependencies until execution, unlike compile-time DI solutions.
Requires installing gonectl and mockgen separately for full functionality, adding setup complexity and potential environment friction.
As a newer framework, it has fewer third-party integrations, tutorials, and community support compared to established alternatives like Uber's dig.