DEV Community

Discussion on: Using Domain-Driven Design(DDD)in Golang

Collapse
 
stevensunflash profile image
Steven Victor

Hi bro, Sorry for the late reply. Just seeing this now. interfaces.NewFood() is a constructor, so we inject dependencies of other services. This is considered best practice, so you avoid the usage of globals in your code.

Some comments have been hidden by the post's author - find out more