Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
miladrahimi committed Nov 23, 2022
1 parent 81074c3 commit 3c0630e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,15 +301,15 @@ container.MustCall(c, func(s Shape) {
```

### Lazy Binding
Both the named and normal `Singleton` and `Transient` binding calls have a lazy version.
Lazy versions defer calling the provided resolver function until the first time the dependency is resolved.
For singletons the resolver function is called only once and the result is stored. Transient

Lazy binding calls include:
* container.SingletonLazy()
* container.NamedSingletonLazy()
* container.TransientLazy()
* container.NamedTransientLazy()
Both the singleton and transient binding calls have a lazy version.
Lazy versions defer calling the provided resolver function until the first call.
For singleton bindings, It calls the resolver function only once and stores the result.

Lazy binding methods:
* `container.SingletonLazy()`
* `container.NamedSingletonLazy()`
* `container.TransientLazy()`
* `container.NamedTransientLazy()`

### Performance
The package Container inevitably uses reflection for binding and resolving processes.
Expand Down

0 comments on commit 3c0630e

Please sign in to comment.