Releases: uber-go/dig
Releases · uber-go/dig
v1.2.0
v1.1.0
- Added the
dig.RootCause
function which allows retrieving the original
constructor error that caused anInvoke
failure. - Errors from
Invoke
now attempt to hint to the user a presence of a similar
type, for example a pointer to the requested type and vice versa.
v1.0.0
v1.0.0-rc2
- Added variadic options to all public APIS so that new functionality can be
introduced post v1.0.0 without introducing breaking changes. - Functions with variadic arguments can now be passed to
dig.Provide
and
dig.Invoke
. Previously this caused an error, whereas now the args will be ignored. - Exported
dig.IsIn
anddig.IsOut
so that consuming libraries can check if
a params or return struct embeds thedig.In
anddig.Out
types, respectively.
v1.0.0-rc1
First release candidate.
v0.5.0
-
dig.In
anddig.Out
now support named instances, i.e.:type param struct { dig.In DB1 DB.Connection `name:"primary"` DB2 DB.Connection `name:"secondary"` }
-
Structs compatible with
dig.In
anddig.Out
may now be generated using
reflect.StructOf
.
v0.4.0
- [Breaking] Remove
Must*
funcs to greatly reduce API surface area. - [Breaking] Restrict the API surface to only
Provide
andInvoke
. - Providing constructors with common returned types results in an error.
- [Breaking] Update
Provide
method to accept variadic arguments. - Add
dig.In
embeddable type for advanced use-cases of specifying dependencies. - Add
dig.Out
embeddable type for advanced use-cases of constructors
inserting types in the container. - Add support for optional parameters through
optional:"true"
tag ondig.In
objects. - Add support for value types and many built-ins (maps, slices, channels).
v0.3
API renaming and introducing Invoke functionality
- Rename
RegisterAll
andMustRegisterAll
toProvideAll
and
MustProvideAll
. - Add functionality to
Provide
to support constructor withn
return
objects to be resolved into thedig.Graph
- Add
Invoke
function to invoke provided function and insert return
objects into thedig.Graph