November 2018
Intermediate to advanced
346 pages
8h 12m
English
Coupling is a measure of how an object or package relates to others. An object is considered to have high coupling if changes to it will likely result in changes to other objects, or vice versa. Conversely, when an object has low coupling, it is independent of other objects or packages. In Go, low coupling is best achieved through implicit interfaces and stable and minimal exported APIs.
Low coupling is desirable as it leads to code where changes are localized. In the following example, by using an implicit interface to define our requirements we are able to insulate ourselves from changes to our dependency:

As you can see from ...
Read now
Unlock full access