8000 Unexpected nested containers behavior · Issue #6 · go-ozzo/ozzo-di · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Unexpected nested containers behavior #6
Open
@samdark

Description

@samdark

https://github.com/go-ozzo/ozzo-di/blob/master/container.go#L222

If type isn't found, it's looked up in parent container and all of its dependencies are looked into parent container only. It doesn't look right to me if I have the following dependency tree:

Foo
  Bar
    Baz
Baz

Primary container has Foo and Baz. Parent container has Bar and Baz.

When building Foo from parent container it goes into parent container to get Bar. Baz is fetched from parent container despite the fact that we have it configured differently in the primary container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0