GOSAMPLES
All
Tours
Cheatsheets
Shorts
generics-intro
Learn the basics of Go Generics with practical examples
👑 Go Generics cheatsheet
Learn how to create type-independent functions
cheatsheet
generics
generics-intro
December 21, 2022
🫘 Count the occurrences of an element in a slice in Go
Learn how to count elements in a slice that meet certain conditions
introduction
generics
generics-intro
December 15, 2022
🖖 Calculate Median in Go using Generics
Learn how to find “the middle value” of a slice
numbers
math
generics
generics-intro
April 11, 2022
🤏 Calculate arithmetic mean in Go using Generics
Learn how to calculate mean for a slice of any numeric type
numbers
math
generics
generics-intro
April 8, 2022
🗑️ Remove duplicates from any slice using Generics in Go
Learn how to create a slice with unique values using Generics
introduction
slice
generics
generics-intro
March 30, 2022
🔉 Reduce function using Generics in Go
Learn how to define a function to accumulate slice values using Generics
introduction
generics
generics-intro
March 16, 2022
🦾 Create a slice 'map' function using Generics in Go
Learn how to apply a function to all slice elements using Generics
introduction
generics
generics-intro
March 16, 2022
💂 Filter a slice using Generics in Go
Learn how to remove elements from a slice that do not meet a certain condition using Generics
introduction
generics
generics-intro
March 16, 2022
🩰 Sort a slice of any type using Generics in Go
Learn how to make an universal sorting function using Generics
introduction
generics
generics-intro
March 16, 2022
🔑 Get a slice of keys from any map using Generics in Go
Learn how to get all keys of a map using Generics
introduction
generics
generics-intro
March 16, 2022
1
...
2