DEV Community

Discussion on: Go Beginners Series: Collection Types, Arrays, Slices, and Maps

Collapse
 
monfernape profile image
Usman Khalil

Hi, I'm a bit unclear on make function.

Collapse
 
olodocoder profile image
Adams Adebayo

Hey Usman,

The make function is used to create and initialize maps, slices, and channels in Go.

They’re mostly used when you want to define the size of the data structure upon creation.