Skip to content

Releases: sarulabs/di

New ParentContainer function

13 Jul 13:17
Compare
Choose a tag to compare

A new function ParentContainer was added because the old Parent does not return an error if the container does not have a parent.

I was implemented to solve the issue :
#35

Major speed improvements

11 Jul 22:08
505d5cd
Compare
Choose a tag to compare

It also adds new features (Def as Get parameter, types, ...) but mostly stays compatible with the previous version.

The biggest change is the Container type. It used to be an interface, but it is now a struct.

The documentation was reorganized.

Improve error messages in recovered panic

24 Mar 19:48
4786fed
Compare
Choose a tag to compare

Also use %+v to print errors in when panic are recovered.

Improve error messages

23 Mar 18:18
7bad26b
Compare
Choose a tag to compare

Use %+v to print errors (instead of %s) to include things like stack traces if the type of the error supports it.

Add Builder.Set method

25 Jan 15:15
56f2d66
Compare
Choose a tag to compare
v2.4.0

Add the Set method to the builder (#19)

Unshared objects

24 Oct 19:22
Compare
Choose a tag to compare

Add unshared objects.

Service override

13 Aug 20:24
bc5c1d2
Compare
Choose a tag to compare

It is now possible to override a service in the Builder.

Fix closing order

15 Jun 18:12
0217505
Compare
Choose a tag to compare

This release fixes two bugs :

  • The objects were closed in a random order. It was possible to have an object with a closed dependency. The objects are now closed in the right order. The dependencies are closed after the objects using them.
  • The second bug was created in the last release. The Close function could be called on an object that was being built. In this case it was not possible to cast the object given to the Close function.

Fix concurrent build calls

11 Jun 20:35
aefea82
Compare
Choose a tag to compare

Two requests could build the same object in the app scope.
The first one was used by the first request, while the second one was used by all the other requests. The first one was forgotten and never closed. It could happen if the first two Get calls were done at the same time or/and if the Build function took some time to be executed.

Definition tags and go modules

26 Oct 18:07
20b162a
Compare
Choose a tag to compare
  • put back tags in service definitions
  • add support for go modules