A reflection based dependency injection toolkit for Go.
Clone or download
Latest commit 6a28c4b Jan 4, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.build Switch to using codecov.io (#85) Jun 2, 2017
internal Update year in license headers Jan 4, 2019
testdata Orient graph from right to left (#222) Nov 6, 2018
.codecov.yml Feed results into container using `result`s (#158) Oct 4, 2017
.gitignore Basic CI setup (#5) Mar 23, 2017
.travis.yml Change travis go versions (#220) Nov 1, 2018
CHANGELOG.md Back to development Jan 4, 2019
LICENSE LICENSE: Update year Jan 3, 2018
Makefile make: Add license target Jan 3, 2018
README.md Refresh stickers (#141) Jul 31, 2017
check_license.sh check_license: Don't ignore nested vendored code Jan 3, 2018
cycle.go Update year in license headers Jan 4, 2019
dig.go Update year in license headers Jan 4, 2019
dig_go19_test.go Update year in license headers Jan 4, 2019
dig_test.go Update year in license headers Jan 4, 2019
doc.go Update year in license headers Jan 4, 2019
error.go Update year in license headers Jan 4, 2019
error_test.go Update year in license headers Jan 4, 2019
example_test.go Update year in license headers Jan 4, 2019
glide.lock Fix build setup (#167) Oct 25, 2017
glide.yaml Fix build setup (#167) Oct 25, 2017
graph.go Update year in license headers Jan 4, 2019
graph_test.go Update year in license headers Jan 4, 2019
param.go Update year in license headers Jan 4, 2019
param_test.go Update year in license headers Jan 4, 2019
result.go Update year in license headers Jan 4, 2019
result_test.go Update year in license headers Jan 4, 2019
stringer.go Update year in license headers Jan 4, 2019
stringer_test.go Update year in license headers Jan 4, 2019
types.go Update year in license headers Jan 4, 2019
utils_for_go19_test.go Update year in license headers Jan 4, 2019
utils_for_pre_go19_test.go Update year in license headers Jan 4, 2019
version.go Back to development Jan 4, 2019
visualize_golden_test.go Update year in license headers Jan 4, 2019

README.md

🔨 dig GoDoc GitHub release Build Status Coverage Status Go Report Card

A reflection based dependency injection toolkit for Go.

Good for:

  • Powering an application framework, e.g. Fx.
  • Resolving the object graph during process startup.

Bad for:

  • Using in place of an application framework, e.g. Fx.
  • Resolving dependencies after the process has already started.
  • Exposing to user-land code as a Service Locator.

Installation

We recommend locking to SemVer range ^1 using Glide:

glide get 'go.uber.org/dig#^1'

Stability

This library is v1 and follows SemVer strictly.

No breaking changes will be made to exported APIs before v2.0.0.