github.com/pkg/errors
v0.9.1
#397 most downloaded on Go modules
pkg/errors
What this package is like to depend on
Last release 4 months ago
27 Mar 2026
Ships unpredictably
gaps range from 9 days to 5.3 years
Most releases are documented
notes for 10 of 13 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
156 releases · first in 2015
2 releases in the last 12 months
see the full history below
Release timeline
156 releases · Dec 2015 to Mar 2026Releases
latest 60 of 156-
v2.0.0-20201214064552-5dd12d0cfe7f+incompatible14 Dec 2020 pre-releaseNothing published for this version
-
v2.0.0-20200114194744-614d223910a1+incompatible14 Jan 2020 pre-releaseNothing published for this version
-
v0.9.2-0.20260327151000-87f8819acf6d27 Mar 2026 pre-releaseNothing published for this version
-
v0.9.2-0.20201214064552-5dd12d0cfe7f14 Dec 2020 pre-releaseNothing published for this version
-
v0.9.114 Jan 2020Release notes
Open source →pkg/errors 0.9.1 is a bug fix release for errors 0.9.0. This restore the previous behaviour on Cause method, this behaviour was changed on the PR: #215 and many breaking changes was produced by that.
-
v0.9.1-0.20201214064552-5dd12d0cfe7f14 Dec 2020 pre-releaseNothing published for this version
-
v0.9.1-0.20200114194744-614d223910a114 Jan 2020 pre-releaseNothing published for this version
-
v0.9.007 Jan 2020Release notes
Open source →errors 0.9.0 is a preparation release for a 1.0 final release. Also we were working on removing support for Go 1.8, 1.9 and 1.10 and earlier, and become compatible this package with new way of errors on Go 1.13.
We tried to move into
runtime.CallerFramesbut this was not possible, you can show the explanation here: Issue 188.The motivation for do the backward compatible this package with Go 1.13 is that you can migrate the easy way for this to the new way.
Now you could use the methods,
IsandAs, and theUnwrap()interface like on the standard library.The method
Causeis now compatible withfmt.Errorf("%w", err)and with theUnwrap()interface.On the same way the methods related with
wrappingon this package now are compatible withCauseandUnwrap()interface.Improvements
.travis.ymlNow use make file.- reduce allocations when printing stack traces. Thanks @cstockton
- Reduce allocations in Stacktrace.Format
- Add Support to Go 1.13. Thanks @jayschwa, @Sherlock-Holo and @puellanivis.
- Add json.Marshaler support to the Frame type. Thanks @flimzy
Bugs fixed
-
v0.8.2-0.20201214064552-5dd12d0cfe7f14 Dec 2020 pre-releaseNothing published for this version
-
v0.8.2-0.20200107213324-49f8f617296107 Jan 2020 pre-releaseNothing published for this version
-
v0.8.2-0.20200103123654-004deef5620003 Jan 2020 pre-releaseNothing published for this version
-
v0.8.2-0.20200103112531-6d954f502eb803 Jan 2020 pre-releaseNothing published for this version
-
v0.8.2-0.20191109102316-7f95ac13edff09 Nov 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20191109083342-ca0248e19bef09 Nov 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190227000051-27936f6d90f927 Feb 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190217225212-856c240a51a217 Feb 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190109061628-ffb6e22f019309 Jan 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190109055146-58be0d7bd49f09 Jan 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190109044528-565c8d0e979209 Jan 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190109043753-e9933c1c09fb09 Jan 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190109043026-ee1923e96d8409 Jan 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190109005833-72fa05efae2309 Jan 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190106015332-c38ea53d8c3f06 Jan 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190105110453-c9e70be2405e05 Jan 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190105090553-42ce1b6a121705 Jan 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190105085915-d56363987d9205 Jan 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190105085434-308074fef00105 Jan 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190105082303-4f47277723cb05 Jan 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190105040006-537896ad6e7a05 Jan 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190105035417-31aac83bad7905 Jan 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190105023211-5ac96aea292305 Jan 2019 pre-releaseNothing published for this version
-
v0.8.2-0.20190103065224-ba968bfe8b2f03 Jan 2019 pre-releaseNothing published for this version
-
v0.8.103 Jan 2019Release notes
Open source →pkg/errors 0.8.1 is a bug fix release for errors 0.8.0. It will be the last version to support Go 1.8 and below. pkg/errors 0.9 and above will require Go 1.9 for the new
runtime.CallersFramesAPI.pkg/errors 0.8.1 also adds one new feature,
errors.WithMessagef. Ideally this would be held over til 0.9, but that complicates the switch toruntime.CallersFrames.Improvements
- Added
errors.WithMessagef. Thanks @chemicL.
Bugs fixed
.travis.yml. Adjust Go versions. Thanks @AlekSi, @dvrkps, @HaraldNordgren, and @komuw- Fixed gofmt. Thanks @tariq1890
- Copyedit the package documentation. Thanks @seh, @TomSweeneyRedHat, @nicksnyder, and @beono
- Remove unreachable code. Thanks @philoserf and @haya14busa
- Move benchmark error sink to global variable. Thanks @bradleyfalzon
- Fix minor newline consistency issues in test files. Thanks @nmiyake
- Add doc comment for exported Format func. Thanks @mrhwick and @ihrwein
- Added
-
v0.8.1-0.20201214064552-5dd12d0cfe7f14 Dec 2020 pre-releaseNothing published for this version
-
v0.8.1-0.20200114194744-614d223910a114 Jan 2020 pre-releaseNothing published for this version
-
v0.8.1-0.20190109061628-ffb6e22f019309 Jan 2019 pre-releaseNothing published for this version
-
v0.8.1-0.20190105085425-937e8c55285f05 Jan 2019 pre-releaseNothing published for this version
-
v0.8.1-0.20181023235946-059132a15dd023 Oct 2018 pre-releaseNothing published for this version
-
v0.8.1-0.20181020222933-d58f9425104620 Oct 2018 pre-releaseNothing published for this version
-
v0.8.1-0.20181014145847-6ed0a2e59ebe14 Oct 2018 pre-releaseNothing published for this version
-
v0.8.1-0.20181008045315-2233dee583dc08 Oct 2018 pre-releaseNothing published for this version
-
v0.8.1-0.20181008045016-e981d1a2c5fa08 Oct 2018 pre-releaseNothing published for this version
-
v0.8.1-0.20180911062113-c059e472caf711 Sep 2018 pre-releaseNothing published for this version
-
v0.8.1-0.20180311214515-816c9085562c11 Mar 2018 pre-releaseNothing published for this version
-
v0.8.1-0.20180217175701-e1ac100e466717 Feb 2018 pre-releaseNothing published for this version
-
v0.8.1-0.20180127015812-30136e27e2ac27 Jan 2018 pre-releaseNothing published for this version
-
v0.8.1-0.20171216070316-e881fd58d78e16 Dec 2017 pre-releaseNothing published for this version
-
v0.8.1-0.20171210022416-8842a6e0cc5910 Dec 2017 pre-releaseNothing published for this version
-
v0.8.1-0.20171209233025-e4f50602972309 Dec 2017 pre-releaseNothing published for this version
-
v0.8.1-0.20171018195549-f15c970de5b718 Oct 2017 pre-releaseNothing published for this version
-
v0.8.1-0.20170910134614-2b3a18b5f0fb10 Sep 2017 pre-releaseNothing published for this version
-
v0.8.1-0.20170505043639-c605e284fe1705 May 2017 pre-releaseNothing published for this version
-
v0.8.1-0.20170316201538-ff09b135c25a16 Mar 2017 pre-releaseNothing published for this version
-
v0.8.1-0.20170227220037-bfd5150e4e4127 Feb 2017 pre-releaseNothing published for this version
-
v0.8.1-0.20161029093637-248dadf4e90629 Oct 2016 pre-releaseNothing published for this version
-
v0.8.1-0.20161002052512-839d9e913e0602 Oct 2016 pre-releaseNothing published for this version
-
v0.8.029 Sep 2016Release notes
Open source →What's new since version 0.7.1
errors 0.8.0 decomposes
Wrap(andWrapf) into their component operations, namely adding a message to an error, and adding a stack trace to an error, which were previously merged into a single operation.This is accomplished by adding two top level functions,
errors.WithMessageanderrors.WithStack, and rewritingWrapandWrapfin terms of these operations.The motivation for this change was need to treat each of the following operations as distinct:
- Adding a context message to an existing error without altering the stack trace.
- Adding a stack trace to an existing error without the requirement of adding an additional message.
- Retrieving the immediate cause of an error; popping one element of the error stack.
The addition of
WithStackandWithMessageincreases the surface area of this package by two methods, after long discussions at GopherCon 2016 it was felt strongly that destructuring the operation ofWrapandWrapfwas necessary.For the moment
WrapandWrapfremain, but depending on your feedback may be deprecated in future releases. Please leave comments via the issue link.Thanks to @nmiyake and @fabstu for their assistance in preparing this release.
Bug fixes
- Add Go 1.7.1 to .travis.yml. Thanks @Thomasdezeeuw
-
v0.7.2-0.20160929013215-3a4fafe48b5629 Sep 2016 pre-releaseNothing published for this version
-
v0.7.2-0.20160929013215-1398fbcad1be29 Sep 2016 pre-releaseNothing published for this version
-
v0.7.2-0.20160929013215-011399d3498729 Sep 2016 pre-releaseNothing published for this version