Golang "Inheritance"

Golang "Inheritance"

For those coming from an Object Oriented language background to Go, it can be rather jarring to hear that there are no classes and thus no inheritance in Go. While this is strictly true, there are ways to "inherit" the same behavior and promote more code reuse in Go. Before we get started, it's important to understand why Go doesn't have inheritance - by design - and the problems that classical inheritance can create. We'll first approach a situation with inheritance and gradually move toward c…

Read More

Design Patterns in Go - Singleton

Have you ever wondered how to translate some traditional design patterns to Golang, a language without classes or the OO concept of inheritance? Then you're in the right place. I'm going to go through a couple different ways to implement the Singleton pattern.

Read More

Close You've successfully subscribed to Doug's Portfolio Blog.
Close Great! You've successfully signed up.
Close Welcome back! You've successfully signed in.
Close Success! Your account is fully activated, you now have access to all content.