Constructors in Go

 Golang

One of Go's weaknesses is the ability to initialise a struct in an 'invalid state', leading to the potential of accidental nil pointer dereferencing further down the line. Learn how we solved this pragmatically.

Bypassing Golang's lack of constructors

 Golang

Golang doesn't provide constructors but instead advocates for a package-level factory method with the New convention. If only this were then the singular way of initialising an object; unfortunately this is not always necessarily the case..