Interfaces in Golang

Pavle Djuric
6 min readJul 8, 2022

If you’re coming from Java, you definitely know about interfaces. If you’re coming from Python, you’re probably scratching your head. But, no matter which language you’re coming from, you’ll be surprised about how Go implements interfaces.

An interface is a type in Go. But, unlike the struct type, the interface type is not concerned with state, but with behavior.

--

--

Pavle Djuric

Software developer. 3 x AWS certified. Writing mostly about Python, Golang, backend development and Cloud computing.