Skip to content

Commit a737e22

Browse files
author
yoyofx
committed
prototype is create a new instance on each call.
1 parent 86d3531 commit a737e22

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)