Go Interfaces are the topic of this tutorial. This is part one of a 4 part series on Go interfaces.
Interfaces are a cause of confusion for a lot of new Golang developers. You can think of an interface as a set of actions you need a type to be able to perform. You define an interface type using the interface keyword, followed by curly braces containing a list of method names, along with any parameters or return values the methods are expected to have.
Watch this video to hear interfaces explained using a detailed analogy and coding example!
⏲ TIMESTAMPS ⏲
01:00 Interfaces Definition
01:20 Job Description Analogy
05:28 Coding Example
source by Esoteric Tech
go programming language