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:

    Project mention: RFC: HTTP Wire Errors | dev.to | 2024-12-01

    Gerasimos Maropoulos is the author of the Iris web framework, a highly efficient and feature-rich web framework for the Go programming language. He is well-known in the programming community for his contributions to web development and his expertise in the Go language. Gerasimos has authored numerous online articles and tutorials that help developers understand and leverage the power of Go for building scalable and high-performance web applications. His work on Iris has made it one of the most popular web frameworks in the Go ecosystem, known for its simplicity, speed, and extensive feature set.

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. wire

    Compile-time Dependency Injection for Go

    Project mention: Dependency Injection in Go: Comparing Wire, Dig, Fx & More | dev.to | 2025-02-05

    Wire is a compile-time dependency injection tool developed by Google. It generates Go code that manually wires dependencies before compilation, ensuring that there is no runtime overhead.

  4. go-clean-template

    Clean Architecture template for Golang services

  5. fx

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

    Project mention: Dependency Injection in Go: Comparing Wire, Dig, Fx & More | dev.to | 2025-02-05

    Fx is a framework built on top of Dig that provides structured dependency injection along with lifecycle management. It simplifies the setup of large applications by managing logging, dependency injection, and application startup.

  6. go-coffeeshop

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

  7. dig

    A reflection based dependency injection toolkit for Go.

    Project mention: Dependency Injection in Go: Comparing Wire, Dig, Fx & More | dev.to | 2025-02-05

    Dig is a runtime dependency injection library developed by Uber. Unlike Wire, which resolves dependencies at compile time, Dig resolves them at runtime, making it more flexible but with a slight performance cost.

  8. do

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

    Project mention: Do: A dependency injection toolkit based on Go 1.18 Generics | news.ycombinator.com | 2024-07-24
  9. Nutrient

    Nutrient – The #1 PDF SDK Library, trusted by 10K+ developers. Other PDF SDKs promise a lot - then break. Laggy scrolling, poor mobile UX, tons of bugs, and lack of support cost you endless frustrations. Nutrient’s SDK handles billion-page workloads - so you don’t have to debug PDFs. Used by ~1 billion end users in more than 150 different countries.

    Nutrient logo
  10. IOC-golang

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

  11. service-pattern-go

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

  12. mortar

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

  13. yokai

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

    Project mention: Some Go demo applications with Yokai | dev.to | 2024-10-28

    We're actively working on Yokai, a simple Go framework coming with an opinionated but modular list of dependencies (like echo, viper, zerolog, grpc, ...), depending of the type of application you'd like to build.

  14. flamego

    A fantastic modular Go web framework with a slim core but limitless extensibility

  15. container

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

  16. gongular

    A different approach to Go web frameworks

  17. 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)

  18. goioc/di

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

  19. 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

    Project mention: A minimalist password manager desktop app: a foray into Golang's Wails framework (Part 2) | dev.to | 2024-12-19

    The truth is that I had worked first with Vanilla Js and Vue, then with React, and even with that strange library that for many is HTMX (which I have to say that I love ❤️). But Svelte makes you fall in love from the beginning, and I have to say that it was while experimenting with Wails that I used it for the first time (and I promise to continue using it…). But as comfortable as a web framework is, we must remind backend developers that the frontend is not that easy 😀!!

  20. di

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

  21. go-web

    A Golang framework for build microservices. (by RobyFerro)

  22. hiboot

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

  23. kod

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

  24. dingo

    Generated dependency injection containers in go (golang) (by sarulabs)

  25. dihedral

    Compile-time dependency injection for Go

  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

  • Dependency Injection in Go: Comparing Wire, Dig, Fx & More

    5 projects | dev.to | 5 Feb 2025
  • Ore: Advanced Dependency Injection Package for Go

    1 project | dev.to | 12 Jan 2025
  • Do: A dependency injection toolkit based on Go 1.18 Generics

    1 project | news.ycombinator.com | 24 Jul 2024
  • @Autowired magic in SpringBoot

    1 project | dev.to | 16 Jun 2024
  • Dependency Injection: A Straightforward Implementation in Golang

    1 project | dev.to | 10 May 2024
  • Injeção de dependência em Go

    2 projects | dev.to | 28 Feb 2024
  • boot-go/boot: Configuration and dependency injection

    1 project | /r/golang | 10 Jul 2023
  • A note from our sponsor - SaaSHub
    www.saashub.com | 16 Feb 2025
    SaaSHub helps you find the best software and product alternatives 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,370
2 wire 13,373
3 go-clean-template 6,424
4 fx 6,130
5 go-coffeeshop 4,194
6 dig 4,018
7 do 1,953
8 IOC-golang 1,210
9 service-pattern-go 858
10 mortar 679
11 yokai 632
12 flamego 582
13 container 570
14 gongular 502
15 Flamingo 498
16 goioc/di 363
17 go-echo-templ-htmx 256
18 di 234
19 go-web 203
20 hiboot 181
21 kod 177
22 dingo 98
23 dihedral 76

Sponsored
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai

Did you know that Go is
the 4th most popular programming language
based on number of references?