Cookies management by TermsFeed Cookie Consent

slice

Slices in Go by example. Learn how to use and how Go slices work

🗑️ 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

◀️ Reverse sort a slice in Go

Learn how to sort a slice in reversed order
sort slice

✂️ Remove duplicates from a slice in Go

Learn how to create a slice with unique values
introduction slice

🧑‍🤝‍🧑 Copy a slice in Go

Learn how to make a deep copy of a slice
introduction slice

🧮 Sort a string slice containing numbers in Go

Learn how to sort strings with numbers in natural order
sort slice strings

🔎 Check if the slice contains the given value in Go

Learn how to write a function that checks if a slice has a specific value
introduction slice

🖨️ Convert string to []byte or []byte to string in Go

Learn the difference between a string and a byte slice
introduction strings slice

🧠 Print the memory address of a variable in Go

Learn how to find and print the address of a variable or pointer
introduction pointer slice

🏟️ Capacity and length of a slice in Go

Learn what is the difference between length and capacity of a slice
introduction slice array

📚 Convert byte slice to io.Reader in Go

Learn how to satisfy io.Reader interface using byte slice
introduction slice
1 ... 2