Go 1.27 reference · 4 entries
Go Built-in Functions
Go's built-in functions for slices, maps and values: append, make, len, cap, min and max.
| Name | Description | Since |
|---|---|---|
append |
Add elements to the end of a slice, growing its backing array when needed; always assign the result back. | |
make |
Create and initialise a slice, map or channel, optionally with a length and capacity (slices) or buffer size (channels). | |
len and cap |
len returns the number of elements in a string, slice, map, array or channel; cap returns a slice's or channel's capacity. | |
min and max |
Return the smallest or largest of their arguments for any ordered type (numbers and strings); built in since Go 1.21. | 1.21 |