Glossary: Data Structures and Algorithms in Go
Capacity
Also written: cap, cap(items)
The number of slots in the array behind a slice, found with `cap`. When length reaches capacity, `append` allocates a bigger array and copies the items over.
Glossary: Data Structures and Algorithms in Go
Also written: cap, cap(items)
The number of slots in the array behind a slice, found with `cap`. When length reaches capacity, `append` allocates a bigger array and copies the items over.