Introduction: Why OOP in Go Isn’t What You Think
I’ve seen hundreds of developers try to write Go like Java, creating inheritance hierarchies that don’t exist and fighting the language every step of the way. “Go has no classes!” — the first shock for developers with Java/C# background. The second — “How to live without inheritance?!” Relax, Go offers something better: composition through embedding, interfaces without explicit implementation, and clear rules for methods.
Common struct/method mistakes I’ve observed: