Skip to content

Releases: berkaroad/ioc

v1.2.0

29 Oct 14:04
3c373d0
Compare
Choose a tag to compare
    1. It will use zero value instead of panic if depended service not registerd, when inject to function
    1. The initialize method that invoked automatically when inject to singleton instance, can specific another one by the returns of method InitializeMethodName() string
    1. optimize performance of inject to *struct
    1. optimize performance of get transient instance
    1. refactor interface Container

v1.1.1

05 Oct 03:23
4f523b0
Compare
Choose a tag to compare
    1. fix bug: replace exists service sometimes doesn't work
    1. optimize: check exists or not before add binding

v1.1.0

04 Oct 03:19
75b0f24
Compare
Choose a tag to compare
    1. add function New() Container
    1. Inject() and InjectFromC() can accept reflect.Value
    1. Resolve() will auto inject to singleton instance and it's method Initialize(XXX)
    1. ioc.SetParent() will append parent to exists parent

    can replace exists service, by register to parent's container and register to current's to override parent's.

    1. add convenient functions for interface Container

    new functions AddSingletonToC(XXX), AddTransientToC(XXX), GetServiceFromC(XXX), InjectFromC(XXX).

    both last parent and new parent can also resolve services.

    1. move SetParent(parent Resolver) from interface Container to Resolver
    1. split method Register(XXX) to RegisterSingleton(XXX) and RegisterTransient(XXX)
    1. 39% faster than v0.1.1

v1.0.0

02 Oct 10:54
ad33661
Compare
Choose a tag to compare

refactor ioc: for simple and performance.

    1. add convenient functions
    1. support inject to function and *struct

    Should add struct tag 'ioc-inject:"true"' to field if want to be injected, but field type ioc.Resolver is not necessary.

    1. 50% faster than last version, when injecting to function

    Compare with Container.Invoke() in last version.

    1. remove interface Initializer

    Because it is not necessary.

    1. rename interface ReadonlyContainer to Resolver

    Just for SetParent() to resolve by parent.

    1. simplify interface Container

    Can customize implementation just for compatibility with others

    1. remove log

v0.1.1

01 Oct 02:06
9f77a02
Compare
Choose a tag to compare
    1. add go mod base on 1.14
    1. use benchmark

v0.1.0

01 Oct 00:25
Compare
Choose a tag to compare
    1. remove readonly lock,
    1. singleton instance's initialization called only once.