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

📰 String padding in Go

Learn how to print aligned strings padded with spaces
introduction strings format

🍕 Compare two slices in Go

Learn how to check if two slices are equal
introduction slice strings

⌛ Temporary file in Go - how to create?

Learn how to create and use a temporary file or folder
introduction file

👣 Print struct variables in Go

Learn how to print struct with variable names
introduction strings go-spew

🔄 Convert CSV to JSON in Go

Learn how to transform CSV file data to JSON
introduction file csv json

🗒️ Read a CSV file in Go

Learn how to read a CSV or TSV file line by line or the whole file at once
introduction file csv

⚙️ Convert interface to string in Go

Learn how to format any value as a string
introduction interface strings

⏲️ Measure execution time in Go

Learn how to measure the time taken by a function
introduction time

📁 List files in a directory in Go

Learn how to list files in a folder in 4 different ways
introduction file

📂 Check if a file exists in Go

Learn how to check if a file exists in Go after or before opening it
introduction file errors
1 ... 5 ... 7