4 Decoupled package communication in Go

dev.to posted by jabber 2066 days ago  

Decoupled packages help us to write clear code, focus on only one thing at a time. With bus Go package, you can get benefit of real event bus system and write decoupled packages easily. With bus package, any handler can listen any events, without knowing who generates the event. Thus, packages can communicate without depending on each other. Moreover, it is very easy to substitute a consumer module. As long as the new module understands the Event struct that are being sent and received, the other modules will never know.

Register to comment or vote on this story