Advanced go - Choosing between a constructor and declaring the type
In go there are two ways to create structures.
Either you instantiate the structure directly, populate its fields. Or you use a constructor, that will populate the structure fields.
Suppose we have a structure:
type Foo struct {
Fuz int
Bar [...
pauldigian.com3 min read