Interfaces in Golang

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.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pavle Djuric

Pavle Djuric

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