Back to Developer Roadmap

Empty Interface

src/data/roadmaps/golang/content/[email protected]

4.0528 B
Original Source

Empty Interface

The empty interface interface{} can hold values of any type since every type implements at least zero methods. Used for generic programming before Go 1.18 generics. Requires type assertions or type switches to access underlying values. Common in APIs handling unknown data types.

Visit the following resources to learn more: