posted 3 years ago
Hi,
I have a func with the following signature:
I have some business logic firing off internally, but it holds different return types and generally speaking a different signature
E.g.
and then the ID that I succesfully retrieved is used here:
My understanding is that whatever logic I fired off inside a func that is part of an external function needs aligning with returned types. I ended up having something along these lines, but I truly dislike it:
func haveYouFoundTheID(request *SomeRequest) (uuid.UUID, error, repository.MyRepository, []event.Event, error, bool){
id, err := retrieveID(request.params) (uuid.UUID, error)
....
}
then it is used in my outer func like this:
Is there a better way to do it? Thank you