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
π Handle errors in Go with errors.Is() and errors.As()
Learn how to check error type using errors.Is() and errors.As() functions
introduction
errors
August 4, 2021
ποΈ 3 ways to pretty print JSON in Go
Learn how to generate JSON with indentation
introduction
json
strings
August 3, 2021
πΊοΈ Convert map to JSON in Go
Learn how to convert map to JSON string
introduction
json
strings
August 1, 2021
π’ Convert int to string in Go
Learn how to convert int, int64, int32, int16 or int8 to a decimal, hexadecimal octal or binary string
introduction
numbers
integer
July 23, 2021
βοΈ Write to a CSV file in Go
Learn how to write data to a CSV or TSV file
introduction
file
csv
June 1, 2021
π Case-insensitive string comparison in Go
Learn how to compare strings in a case-insensitive manner
introduction
strings
May 25, 2021
π Check if a string starts with a substring in Go
Learn how to use strings.HasPrefix() function
introduction
strings
May 11, 2021
βοΈ Write to a file in Go
Learn how to write any data to a file
introduction
file
April 29, 2021
π Read a file in Go
Learn how to read the content of any file
introduction
file
April 27, 2021
π’ Generate a random number in Go
Learn how to generate a random number
introduction
random
April 22, 2021
1
...
6
...
7