Abstract
In this talk, I will show you how to handle complex dependency graphs in Go using the Fx framework. It can make your life easier in many regards, but its greatest value is in the way it enables you to modularize & share your infrastructure code across multiple microservices. The talk focuses on introducing the concept of dependency injection & its implementation in Go using the [Fx framework](https://github.com/uber-go/fx). Apart from providing a dependency injection mechanism, this framework enables you to separate your application into distinct, independent modules, which can be shared across multiple codebases. This is especially valuable in a microservice environment, where every service has a lot of "boilerplate" infrastructure code which has to be present on any service regardless of its business logic. In a typical microservice architecture, every service needs some kind of a healthcheck, an ELK/monitoring client, tracing clients & various other integrations specific to your server environment. By extracting this common piece of software in a module, which can be "plugged in" and reused across services using Fx, one can greatly reduce development time & maintenance cost as you'd need to deal with "wiring infra" only once & reuse that across your codebase.