From a737e222bf33026bb342e65e0deee3252a403085 Mon Sep 17 00:00:00 2001 From: yoyofx Date: Thu, 22 Jul 2021 14:35:54 +0800 Subject: [PATCH] prototype is create a new instance on each call. --- default_serviceprovider_factory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default_serviceprovider_factory.go b/default_serviceprovider_factory.go index 5d3cfd7..bb31700 100644 --- a/default_serviceprovider_factory.go +++ b/default_serviceprovider_factory.go @@ -13,7 +13,7 @@ func (sc ServiceCollection) Build() IServiceProvider { } //prototype is create a new instance on each call. if desc.Lifetime != Singleton { - //providerOptions = append(providerOptions) + providerOptions = append(providerOptions, Prototype()) } provider := Provide(desc.Provider, providerOptions...)