#What is wrong with this array that contain function call ?
10 messages · Page 1 of 1 (latest)
Cannot use 'logger.NewService'
(type func(_ *do.Injector) (*Service, error))
as the type
func(*do.Injector) (any, error)
service is not any
I want to use any because I have different type of service
the slice's signature is func(*do.Injector) (any, error)
new service's signature is NewService(_ *do.Injector) (*Service, error)
it needs to also return any for it to match
in the end I want to do something like
{logger.NewService, foo.NewService}
So I need any in array