The Struct Embedding Trap in Go

Go is a programming language that uses composition over inheritance. Yet, it provides a feature known as Struct Embedding that abstracts this, and makes it seem as if Go supports inheritance, leading us to make wrong assumptions and fall into a trap I’ll demystify in this article. Particularly for those coming from an object-oriented language like Java.