Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. Gone

Gone

MITGov2.2.6

A lightweight dependency injection framework for Go with tag-based auto injection, config center support, and rich ecosystem components.

GitHubGitHub
131 stars8 forks0 contributors

What is Gone?

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.

Target Audience

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.

Value Proposition

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.

Overview

🚀 Gone - A Lightweight Dependency Injection Framework for Go | Tag-based Auto Injection | Supports Config Center/Lifecycle Management | Provides Rich Ecosystem Components and Scaffolding Tool

Use Cases

Best For

  • Implementing dependency injection in Go applications with minimal boilerplate using struct tags.
  • Managing component lifecycles (initialization, start, stop) automatically in Go services.
  • Injecting configuration from multiple sources (environment variables, config files, external config centers) into Go structs.
  • Integrating pre-built components for logging, database, LLM, and observability in Go projects.
  • Scaffolding new Go projects with dependency injection setup using the included gonectl tool.
  • Mocking dependencies for testing in Go applications via the gonectl tool's code generation features.

Not Ideal For

  • Projects with minimal dependencies where manual wiring is simpler and more transparent
  • Teams already using compile-time DI frameworks like Google Wire, as Gone's runtime injection offers less early error detection
  • Developers who prefer explicit, code-first dependency management without tag-based 'magic' annotations
  • Legacy Go applications with established wiring patterns, where migrating to Gone's conventions would be disruptive

Pros & Cons

Pros

Tag-Based Injection Simplicity

Uses Golang struct tags like `gone:"*"` for automatic dependency injection, reducing boilerplate code as shown in the README example with private field support.

Integrated Lifecycle Management

Provides Init(), start, and stop methods with hooks for automated service management, simplifying component orchestration without manual wiring.

Rich Ecosystem Components

Offers pre-built goner components for logging, database, LLM, and observability, accelerating development with ready-to-use modules from the goner repository.

Powerful Scaffolding Tool

Includes gonectl for project creation, code generation, and test mocking, streamlining setup and maintenance as demonstrated in the quick start guide.

Cons

Runtime Error Risk

Dependency resolution via tags occurs at runtime, which can hide misconfigurations or missing dependencies until execution, unlike compile-time DI solutions.

External Tool Dependency

Requires installing gonectl and mockgen separately for full functionality, adding setup complexity and potential environment friction.

Limited Community Maturity

As a newer framework, it has fewer third-party integrations, tutorials, and community support compared to established alternatives like Uber's dig.

Frequently Asked Questions

Quick Stats

Stars131
Forks8
Contributors0
Open Issues0
Last commit8 months ago
CreatedSince 2022

Tags

#wire#dependency-injection#scaffolding-tool#di#golang#microservices#configuration-management#go#lifecycle-management

Built With

G
Go

Included in

Go169.1k
Auto-fetched 10 hours ago

Related Projects

GinGin

Gin is a high-performance HTTP web framework written in Go. It provides a Martini-like API but with significantly better performance—up to 40 times faster—thanks to httprouter. Gin is designed for building REST APIs, web applications, and microservices.

Stars89,186
Forks8,691
Last commit24 days ago
EchoEcho

High performance, minimalist Go web framework

Stars32,698
Forks2,361
Last commit6 days ago
BeegoBeego

beego is an open-source, high-performance web framework for the Go programming language.

Stars32,421
Forks5,577
Last commit6 days ago
GoFrGoFr

An opinionated GoLang framework for accelerated microservice development. Built in support for databases and observability.

Stars20,941
Forks1,761
Last commit9 hours ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub