MCPcopy Index your code
hub / github.com/uber-go/dig

github.com/uber-go/dig @v1.19.0 sqlite

repository ↗ · DeepWiki ↗ · release v1.19.0 ↗
756 symbols 1,948 edges 48 files 231 documented · 31% 11 cross-repo links
README

:hammer_and_pick: 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.

Stargazers over time

Stargazers over time

Extension points exported contracts — how you extend this code

Error (Interface)
Error is an interface implemented by all Dig errors. Use this interface, in conjunction with [RootCause], in order to d [10 …
error.go
ProvideOption (Interface)
A ProvideOption modifies the default behavior of Provide. [5 implementers]
provide.go
Option (Interface)
Option configures a Container. [4 implementers]
container.go
DecorateOption (Interface)
DecorateOption modifies the default behavior of Decorate. [3 implementers]
decorate.go
Clock (Interface)
Clock defines how dig accesses time. [2 implementers]
internal/digclock/clock.go
Graph (Interface)
Graph represents a simple interface for representation of a directed graph. It is assumed that each node in the graph is [2 …
internal/graph/graph.go
VisualizeOption (Interface)
A VisualizeOption modifies the default behavior of Visualize. [1 implementers]
visualize.go
InvokeOption (Interface)
An InvokeOption modifies the default behavior of Invoke. [1 implementers]
invoke.go

Core symbols most depended-on inside this repo

RequireProvide
called by 291
internal/digtest/container.go
New
called by 236
internal/digtest/container.go
Error
called by 152
error.go
RequireInvoke
called by 115
internal/digtest/container.go
Provide
called by 84
provide.go
Invoke
called by 83
invoke.go
String
called by 55
decorate_test.go
DryRun
called by 50
container.go

Shape

Method 301
Struct 232
Function 182
Interface 21
TypeAlias 17
FuncType 3

Languages

Go100%

Modules by API surface

dig_test.go127 symbols
container.go57 symbols
error.go56 symbols
provide.go52 symbols
internal/dot/graph.go37 symbols
param.go35 symbols
scope.go32 symbols
result.go30 symbols
decorate_test.go26 symbols
error_test.go25 symbols
result_test.go24 symbols
decorate.go21 symbols

Dependencies from manifests, versioned

github.com/pmezard/go-difflibv1.0.0 · 1×
gopkg.in/yaml.v3v3.0.1 · 1×

For agents

$ claude mcp add dig \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact