interface use in golang code example Example: interfaces in golang The interface is a collection of methods as well as it is a custom type.