How to explicitly declare that a struct implements an interface in Go

rules to follow

One of the things I love about Go and find to be a strong supporter of serendipitous interface standardization is Go’s implicitly declared interfaces. However, there are times you really, really want to explicitly declare an interface, such as when you have a larger interface and you want your IDE and/or the compiler to tell …

PHP delegation vs. GoLang type embedding


PHP implements composition (vs. inheritance) of object class properties and methods to other classes using delegation. Go on the other hand implements composition with type embedding. Read this post to learn about the differences and to appreciate the benefits of Go’s approach compared to that of PHP.

GoLang Strict Typing and Interface Slices


Photo by Louise Lyshøj on Unsplash This is a GoLang Experience Report. …but you cannot define the rows parameter as type []RowInserter because []interface{} won’t match it, even though RowInserter is itself an interface. Background I am relatively new to programming Go, but I have been developing software professionally in a variety of programming languages …