2017-08-17 03:23:10 +02:00
|
|
|
Package errors provides simple error handling primitives.
|
|
|
|
|
|
|
|
The traditional error handling idiom in Go is roughly akin to
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2017-08-25 18:30:23 +02:00
|
|
|
which applied recursively up the call stack results in error reports without
|
|
|
|
context or debugging information. The errors package allows programmers to add
|
|
|
|
context to the failure path in their code in a way that does not destroy the
|
|
|
|
original value of the error.
|