Russia has invaded Ukraine and already killed tens of thousands of civilians, with many more raped or tortured. It's a
genocide
. We need your help. Let's fight back against the Russian regime.
Help Ukraine! Fight the Russian regime!
GOSAMPLES
All
Shorts
introduction
Learn the basics of Go with practical examples
Please consider supporting us by disabling your ad blocker
🏟️ Capacity and length of a slice in Go
Learn what is the difference between length and capacity of a slice
introduction
slice
array
October 5, 2021
🕵️ Solve 'cannot take address of XXX' error in Go
Learn how to take the address of a literal, map value, or function return value
introduction
pointer
errors
October 4, 2021
🔟 Convert string to bool in Go
Learn how to parse a string as a bool
introduction
strings
bool
September 30, 2021
👯 Remove duplicate spaces from a string in Go
Learn how to remove all redundant whitespaces from a string
introduction
strings
regex
September 29, 2021
📚 Convert byte slice to io.Reader in Go
Learn how to satisfy io.Reader interface using byte slice
introduction
slice
September 15, 2021
📁 Create a directory in Go
Learn how to create a single or a hierarchy of directories
introduction
file
September 14, 2021
📎 Convert JSON to CSV in Go
Learn how to transform JSON file to CSV
introduction
file
json
csv
September 13, 2021
🖐️ Declare enum in Go
Learn how to declare and use enums
introduction
enum
iota
const
September 7, 2021
🧐 iota in Go - how to use?
Learn how to use iota keyword in constants declaration
introduction
iota
const
September 6, 2021
💡 Empty slice vs nil slice in Go
Learn what is the difference between empty and nil slice and when to use them
introduction
slice
September 2, 2021
1
...
4
...
7