Cookies management by TermsFeed Cookie Consent
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!


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

πŸ—ƒοΈ 3 ways to pretty print JSON in Go

Learn how to generate JSON with indentation
introduction json strings

πŸ—ΊοΈ Convert map to JSON in Go

Learn how to convert map to JSON string
introduction json strings

πŸ”’ 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

βœ’οΈ Write to a CSV file in Go

Learn how to write data to a CSV or TSV file
introduction file csv

πŸ™Œ Case-insensitive string comparison in Go

Learn how to compare strings in a case-insensitive manner
introduction strings

🏁 Check if a string starts with a substring in Go

Learn how to use strings.HasPrefix() function
introduction strings

✍️ Write to a file in Go

Learn how to write any data to a file
introduction file

πŸ“– Read a file in Go

Learn how to read the content of any file
introduction file

πŸ”’ Generate a random number in Go

Learn how to generate a random number
introduction random
1 ... 6 ... 7