# Error Handling In Go, Part I

DevFeed: [Error Handling In Go, Part I](<https://devfeed.tech/articles/error-handling-in-go-part-i-22106.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2014/10/error-handling-in-go-part-i.html>)

Published: 2014-10-13T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>), [Library](<https://devfeed.tech/topics/library.md>), [HTTP](<https://devfeed.tech/topics/http.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [error-interface](<https://devfeed.tech/tags/error-interface.md>), [errors](<https://devfeed.tech/tags/errors.md>), [function](<https://devfeed.tech/tags/function.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [http](<https://devfeed.tech/tags/http.md>), [interface](<https://devfeed.tech/tags/interface.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [library](<https://devfeed.tech/tags/library.md>), [programming](<https://devfeed.tech/tags/programming.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>), [types](<https://devfeed.tech/tags/types.md>)

## AI overview

This tutorial explains idiomatic error handling in Go. It covers returning the error interface, checking for nil errors, and how the standard library's errorString struct implements that interface.

## Source excerpt

Introduction It is idiomatic in Go to use the error interface type as the return type for any error that is going to be returned from a function or method. This interface is used by all the functions and methods in the standard library that return errors. For example, here is the declaration for the Get method from the http package: Listing 1.1