Skip to content

Commit 1db7215

Browse files
authored
Merge pull request #3 from yoyofxteam/dev
prototype is create a new instance on each call.
2 parents 6ce7509 + a737e22 commit 1db7215

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

default_serviceprovider_factory.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func (sc ServiceCollection) Build() IServiceProvider {
1313
}
1414
//prototype is create a new instance on each call.
1515
if desc.Lifetime != Singleton {
16-
//providerOptions = append(providerOptions)
16+
providerOptions = append(providerOptions, Prototype())
1717
}
1818

1919
provider := Provide(desc.Provider, providerOptions...)

0 commit comments

Comments
 (0)