GOSAMPLES
All
Tours
Cheatsheets
Shorts
errors
Learn how to effectively handle Go errors
Please consider supporting us by disabling your ad blocker
🌯 Wrap and Unwrap errors in Go
Learn how to create and handle an error hierarchy
introduction
errors
March 13, 2022
🔌 Handle 'connection reset by peer' error in Go
Learn what it means and how to detect the 'connection reset by peer' error
http
errors
October 21, 2021
🕵️ Solve 'cannot take address of XXX' error in Go
Learn how to take the address of a literal, map value, or function return value
introduction
pointer
errors
October 4, 2021
🪠 Handle 'broken pipe' error in Go
Learn how to detect the 'broken pipe' error when writing an HTTP response
http
errors
September 17, 2021
📡 Handle Context Deadline Exceeded error in Go
Learn how to check if a HTTP client returns a request timeout error
http
errors
August 19, 2021
📂 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
August 5, 2021
🐛 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