Skip to content
A reflection based dependency injection toolkit for Go.
Go Other
  1. Go 99.1%
  2. Other 0.9%
Branch: master
Clone or download
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 Implement a dig.As ProvideOption (#233) Mar 27, 2019
.codecov.yml Feed results into container using `result`s (#158) Oct 4, 2017
.gitignore Basic CI setup (#5) Mar 23, 2017
.travis.yml travis: Switch to Go 1.11 and 1.12 (#234) Mar 25, 2019
CHANGELOG.md Back to development Jan 4, 2019
LICENSE LICENSE: Update year Jan 3, 2018
Makefile travis: Switch to Go 1.11 and 1.12 (#234) Mar 25, 2019
README.md README: Change dig emoji (#244) Jun 14, 2019
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 Implement a dig.As ProvideOption (#233) Mar 27, 2019
dig_go19_test.go Update year in license headers Jan 4, 2019
dig_test.go Implement a dig.As ProvideOption (#233) Mar 27, 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
graph.go Update year in license headers Jan 4, 2019
graph_test.go Implement a dig.As ProvideOption (#233) Mar 27, 2019
param.go Update year in license headers Jan 4, 2019
param_test.go Update year in license headers Jan 4, 2019
result.go Implement a dig.As ProvideOption (#233) Mar 27, 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 consuming SemVer major version 1 using your dependency manager of choice.

$ glide get 'go.uber.org/dig#^1'
$ dep ensure -add "go.uber.org/dig@v1"
$ go get 'go.uber.org/dig@v1'

Stability

This library is v1 and follows SemVer strictly.

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

You can’t perform that action at this time.