Go Dependency Injection

Open-source Go projects categorized as Dependency Injection

Top 23 Go Dependency Injection Projects

Dependency Injection
  1. Iris

    The fastest HTTP/2 Go Web Framework. New, modern and easy to learn. Fast development with Code you control. Unbeatable cost-performance ratio :rocket:

  2. AppSignal

    AppSignal knows why the f*#k it crashed. Stop vibe-debugging. Every exception, every backtrace, grouped so you see patterns, not noise.

    AppSignal logo
  3. fx

    A dependency injection based application framework for Go. (by uber-go)

    Project mention: How we write Go API integration tests using Uber's fxtest package | dev.to | 2026-03-12

    Fx is a dependency injection (DI) framework for Go, developed at Uber. At its core, it simplifies the problem of wiring dependencies together. Instead of manually constructing and passing dependencies through every layer of your application, you map types to constructors. When something depends on a type, Fx figures out how to provide it and injects it automatically. This is especially valuable with deeply nested structures. Without DI, threading a new dependency through multiple layers of "Russian doll" constructors quickly becomes repetitive. As our own dependency graph grew, Fx enabled us to group related dependencies into domain-specific modules.

  4. go-clean-template

    Clean Architecture template for Golang services

  5. dig

    A reflection based dependency injection toolkit for Go.

    Project mention: Dependency Injection in Go: Patterns & Best Practices | dev.to | 2025-12-10

    Uber Dig - Runtime Dependency Injection

  6. go-coffeeshop

    ☕ A practical event-driven microservices demo built with Golang. Nomad, Consul Connect, Vault, and Terraform for deployment

  7. do

    ⚙️ A dependency injection toolkit based on Go 1.18+ Generics.

  8. IOC-golang

    IOC-golang is a powerful golang dependency injection framework that provides a complete implementation of IoC containers.

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. service-pattern-go

    Simple clean Go REST API architecture with dependency injection and mocking example, following SOLID principles.

  11. yokai

    Simple, modular, and observable Go framework for backend applications.

  12. mortar

    Mortar is a GO framework/library for building gRPC (and REST) web services. (by go-masonry)

  13. flamego

    The modular Go framework for composable systems

  14. container

    A lightweight yet powerful IoC dependency injection container for the Go programming language (by golobby)

  15. Flamingo

    Flamingo Framework and Core Library. Flamingo is a go based framework to build pluggable applications. Focus is on clean architecture, maintainability and operation readiness. (by i-love-flamingo)

  16. gongular

    A different approach to Go web frameworks

  17. goioc/di

    Simple and yet powerful Dependency Injection for Go (by goioc)

  18. go-echo-templ-htmx

    Go/Echo+Templ+Htmx: Full stack application using Golang's Echo framework & Templ templating language with user session management + CRUD to a SQLite database (To Do List) and HTMX in the frontend

  19. di

    🛠 A full-featured dependency injection container for go programming language. (by d3fvxl)

  20. go-web

    A Golang framework for build microservices. (by RobyFerro)

  21. kod

    A generics based dependency injection application framework for Go, supporting aspect oriented programming based on interceptors (by go-kod)

  22. hiboot

    hiboot is a high performance web and cli application framework with dependency injection support

  23. gontainer

    Simple but powerful dependency injection container for Go projects!

  24. kessoku

    Next-generation google/wire with parallel dependency injection for Go

  25. go-vertical-slice-template

    A Golang boilerplate template, based on Vertical Slice Architecture and CQRS pattern with using Echo, Gorm, Zap, Viper, Go-MediatR for CQRS and Dig for Dependency Injection.

  26. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Go Dependency Injection discussion

Log in or Post with

Go Dependency Injection related posts

  • Show HN: Kanna – Go generators for DI, queries, internationalization and more

    1 project | news.ycombinator.com | 20 Aug 2026
  • Part 5: Mastering Dependency Resolution in Go with Parsley

    1 project | dev.to | 15 May 2026
  • Part 0: The Case for Dependency Injection in Go

    2 projects | dev.to | 15 May 2026
  • Part 6: Ensuring Reliability - Validation and Proxies with Parsley

    1 project | dev.to | 15 May 2026
  • Part 4: Advanced Registration Patterns in Go with Parsley

    1 project | dev.to | 15 May 2026
  • How we write Go API integration tests using Uber's fxtest package

    2 projects | dev.to | 12 Mar 2026
  • GopherCon 2019: Uber's Approach (1)

    1 project | dev.to | 14 Jan 2026
  • A note from our sponsor - AppSignal
    www.appsignal.com | 5 Oct 2026
    Stop vibe-debugging. Every exception, every backtrace, grouped so you see patterns, not noise. Learn more →

Index

What are some of the best open-source Dependency Injection projects in Go? This list will help you:

# Project Stars
1 Iris 25,560
2 fx 7,695
3 go-clean-template 7,692
4 dig 4,492
5 go-coffeeshop 4,357
6 do 2,816
7 IOC-golang 1,227
8 service-pattern-go 901
9 yokai 841
10 mortar 677
11 flamego 622
12 container 612
13 Flamingo 559
14 gongular 504
15 goioc/di 378
16 go-echo-templ-htmx 297
17 di 241
18 go-web 204
19 kod 199
20 hiboot 180
21 gontainer 156
22 kessoku 142
23 go-vertical-slice-template 128

Sponsored
AppSignal knows why the f*#k it crashed.
Stop vibe-debugging. Every exception, every backtrace, grouped so you see patterns, not noise.
www.appsignal.com