Skip to content

AlexMykhailov1/go1.21

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go1.21

Short overview of the key features of Go 1.21

Contents

  • Overview of 3 new packages: maps, slices, and cmp.
  • Overview of the new syntax: clear, min and max functions.
Press view to see the specific code or run to run it in the playground.
  • min and max: view, run.
  • clear: view, run.
  • cmp: view, run.
  • Maps
    • Return a copy of a map — Clone: view, run.
    • Copy all key-value pairs with overwriting — Copy: view, run.
    • Delete specific key-value pairs — DeleteFunc: view, run.
    • Understand if maps are equal — Equal: view, run
  • 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.

About

Short overview of the key features of Go 1.21

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages