From 3c0630e921f20eeb491a973749dca050f9b9f890 Mon Sep 17 00:00:00 2001 From: Milad Rahimi Date: Wed, 23 Nov 2022 13:31:04 +0330 Subject: [PATCH] Update README.md --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 20ded08..02655b1 100644 --- a/README.md +++ b/README.md @@ -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.