Golang Code Examples

Learn Golang programming by example. GOSAMPLES is a library of Golang code snippets that let you solve everyday code problems.

🪠 Handle Broken Pipe error in Go

Learn how to detect the Broken Pipe error when writing an HTTP response
http errors

📚 Convert byte slice to io.Reader in Go

Learn how to satisfy io.Reader interface using byte slice
introduction slice

📁 Create a directory in Go

Learn how to create a single or a hierarchy of directories
introduction file

📎 Convert JSON to CSV in Go

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

🗄️ Unzip a file in Go

Learn how to uncompress a zip file
compression file zip
1 ... 9