Popularity
2.9
Growing
Activity
7.1
Declining
37
4
4

Programming language: Go
Latest version: v1.2.1

di alternatives and similar packages

Based on the "Dependency Injection" category

Do you think we are missing an alternative of di or a related project?

Add another 'Dependency Injection' Package

README

DI

Documentation Release Build Status Go Report Card Code Coverage

Dependency injection for Go programming language.

[Tutorial](./docs/tutorial.md) | [Examples](./_examples) | [Advanced features](./docs/advanced.md)

Dependency injection is one form of the broader technique of inversion of control. It is used to increase modularity of the program and make it extensible.

This library helps you to organize responsibilities in your codebase and make it easy to combine low-level implementation into high-level behavior without boilerplate.

Features

  • Intuitive auto wiring
  • Interface implementations
  • Constructor injection
  • Optional injection
  • Field injection
  • Lazy-loading
  • Named types
  • Grouping
  • Cleanup

Documentation

You can use standard pkg.go.dev and inline code comments. If you do not have experience with auto-wiring libraries as google/wire, uber-go/dig or another - start with [tutorial](./docs/tutorial.md).

Install

go get github.com/goava/di

Questions

If you have any questions, feel free to create an issue.