A reflection based dependency injection toolkit for Go.
Clone or download
Permalink
Failed to load latest commit information.
.build Switch to using codecov.io (#85) Jun 2, 2017
internal Merge pull request #218 from rhang-uber/rhang/prune-grafx-graph Nov 6, 2018
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 Update changelog for Group ProvideOption (#226) Nov 15, 2018
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 Add DeferAcyclicVerification option (#209) Sep 19, 2018
dig.go Expose "Group" Provide option (#225) Nov 15, 2018
dig_go19_test.go Update license headers to 2018 (#177) Jan 2, 2018
dig_test.go Expose "Group" Provide option (#225) Nov 15, 2018
doc.go Add canonical import path (#192) Jun 7, 2018
error.go VisualizeOption: Add GraphErr to VisualizeOption (#200) Aug 17, 2018
error_test.go Update license headers to 2018 (#177) Jan 2, 2018
example_test.go Update license headers to 2018 (#177) Jan 2, 2018
glide.lock Fix build setup (#167) Oct 25, 2017
glide.yaml Fix build setup (#167) Oct 25, 2017
param.go VisualizeError: Move updates to graph into errors (#199) Aug 17, 2018
param_test.go detectCycles: Prevent wasteful recursion (#208) Sep 18, 2018
result.go Expose "Group" Provide option (#225) Nov 15, 2018
result_test.go result: Don't modify *Container directly Jan 13, 2018
stringer.go node: Avoid accessing internals Jan 13, 2018
stringer_test.go Update license headers to 2018 (#177) Jan 2, 2018
types.go Update license headers to 2018 (#177) Jan 2, 2018
utils_for_go19_test.go Update license headers to 2018 (#177) Jan 2, 2018
utils_for_pre_go19_test.go Update license headers to 2018 (#177) Jan 2, 2018
version.go Back to development Nov 6, 2018
visualize_golden_test.go VisualizeOption: Add GraphErr to VisualizeOption (#200) Aug 17, 2018

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.