Short overview of the key features of Go 1.21
- Overview of 3 new packages: maps, slices, and cmp.
- Overview of the new syntax: clear, min and max functions.
- min and max: view, run.
- clear: view, run.
- cmp: view, run.
- Maps
- Slices
- Binary search — BinarySearch: view, run. BinarySearchFunc: view, run.
- Remove unused capacity — Clip: view, run.
- Return a copy of a slice — Clone: view, run.
- Remove all duplicate values — Compact: view, run. CompactFunc: view, run.
- Compare elements of 2 slices — Compare: view, run.
- Understand if value is present in a slice — Contains: view, run. ContainsFunc: view, run.
- Remove elements from slice — Delete: view, run.
- Understand if 2 slices are equal — Equal: view, run.
- Add capacity to the slice — Grow: view, run.
- Return an index of provided element — Index: view, run.
- Insert values into the slice — Insert: view, run.
- Understand if function is sorted — IsSorted: view, run.
- Find minimum or maximum value in a slice — Min & Max (different functions): view, run.
- Replace elements in a slice — Replace: view, run.
- Reverse a slice — Reverse: view, run.
- Sort slice in ascending order — Sort: view, run.