Skip to Content
Hands-On Software Engineering with Golang
book

Hands-On Software Engineering with Golang

by Achilleas Anagnostopoulos
January 2020
Intermediate to advanced
640 pages
16h 56m
English
Packt Publishing
Content preview from Hands-On Software Engineering with Golang

Breaking circular dependencies via implicit interfaces

In the following imaginary scenario, we are working for a start-up company that is building the software that's responsible for controlling fully automated warehouses. Autonomous robots equipped with gripping arms and lasers (what could possibly go wrong?) are busy moving around the warehouse floor locating and picking up order items from the shelves and placing them in cardboard boxes that are then shipped to the customers.

This is a tentative definition for a warehouse Robot:

package warehouse

import "context"

// Robot navigates the warehouse floor and fetches items for packing.
type Robot struct {
    // various fields
}

// AcquireRobot blocks until a Robot becomes available or until ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Software Architecture with Golang

Hands-On Software Architecture with Golang

Jyotiswarup Raiturkar

Publisher Resources

ISBN: 9781838554491Supplemental Content