November 2018
Intermediate to advanced
346 pages
8h 12m
English
When we started in Chapter 4, Introduction to the ACME Registration Service, our main() function looks rather simple, as shown in the following code:
func main() { // bind stop channel to context ctx := context.Background() // start REST server server := rest.New(config.App.Address) server.Listen(ctx.Done())}
After applying several DI methods to our code, by Chapter 9, Just-in-Time Dependency Injection, our main() function had become the following:
func main() { // bind stop channel to context ctx := context.Background() // build the exchanger exchanger := exchange.NewConverter(config.App) // build model layer getModel := get.NewGetter(config.App) listModel := list.NewLister(config.App) registerModel := register ...
Read now
Unlock full access