Showing 2 of 6 total issues
Function BuildContainerDo
has 12 return statements (exceeds 4 allowed). Open
Open
func BuildContainerDo() do.Injector {
injector := do.New()
do.ProvideTransient(injector, func(inj do.Injector) (*A, error) {
return NewA(do.MustInvoke[*B](inj), do.MustInvoke[*C](inj)), nil
})
Function RegisterToOreContainer
has 11 return statements (exceeds 4 allowed). Open
Open
func RegisterToOreContainer(container *ore.Container) {
ore.RegisterFuncToContainer(container, ore.Transient, func(ctx context.Context) (*A, context.Context) {
b, ctx := ore.GetFromContainer[*B](container, ctx)
c, ctx := ore.GetFromContainer[*C](container, ctx)
return NewA(b, c), ctx