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
Tours
Cheatsheets
Shorts
Go Tutorials & Examples
Learn Go programming by example.
GOSAMPLES
is a library of Go tutorials and examples that helps you solve everyday code problems.
Please consider supporting us by disabling your ad blocker
🙌 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
🍃 Environment variables in Go
Learn how to work with environment variables
introduction
environment variables
April 21, 2021
💤 While loop in Golang
Learn how to construct the popular programming while loop
introduction
loop
April 20, 2021
🪓 8 ways to split a string in Go
Learn how to split a string by comma or any other separator in Go
strings
April 19, 2021
⛓️ URL Decode in Go
Learn how to URL decode a path and query parameters in Go
introduction
encoding
url
April 15, 2021
🔗 URL Encode in Go
Learn how to URL encode a path and query parameters in Go
introduction
encoding
url
April 13, 2021
1
...
10
...
11