This repository was archived by the owner on Oct 19, 2022. It is now read-only.
Update dependency com_github_pkg_errors to v0.9.1 #44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.0.0->v0.9.1Release Notes
pkg/errors
v0.9.1Compare 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.0Compare 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.Bugs fixed
.travis.ymlAdjust Go versions. Thanks @komuw, @aperezgv0.8.1Compare 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
errors.WithMessagef. Thanks @chemicL.Bugs fixed
.travis.yml. Adjust Go versions. Thanks @AlekSi, @dvrkps, @HaraldNordgren, and @komuwv0.8.0Compare 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:
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
v0.7.1Compare Source
What's new since version 0.7.0
0.7.1 is a minor release in the 0.7 series which contains bugfixes, documentation improvements and cleanups and some internal refactoring.
Improvements
StackTraceinterface tostacktracerin docs and examples.Bug fixes
pkg/errorsis vendored. Fixes #77. Thanks @expv0.7.0Compare Source
What's new since version 0.6.0
0.7.0 removes the deprecated
errors.Locationanderrors.Stackinterfaces, and theerrors.Fprinthelper. Types returned from this package now implement thefmt.Formatterinterface and can print themselves when passed tofmt.Printfand friends.For example:
fmt.Printf("%s\n", err)will print the message of the error as per normal, recursive if the underlying error has aCausemethod.fmt.Printf(%v\n", err)operates the same as%s.fmt.Printf(%+v\n", err)prints the error message as above, then prints a stack trace of the point that the error was created witherrors.New,errors.Errorf, etc.This new behaviour is described in this blog post.
Other changes in 0.7.0 include:
Stacktrace() []Frameinterface method was renamed toStackTrace() StackTrace. Please note the change in capitalisation. The previous interface was added in 0.6.0 so hopefully this change will not cause to many breaking changes. The name and signature of the method is not expected to change again in the future. Fixes #50.Bug fixes
README.mdincorrectly reported the licence of this package as MIT, not BSD 2 clause, this has been rectified. Thanks @anthonyfok. Fixes #41.v0.6.0Compare Source
What's new since version 0.5.1
The 0.6.0 release is a transitional release aimed at exposing the error's call stack, introduced in 0.5.0, to the caller.
0.6.0 is the last release that will support the
errors.Fprinthelper function. This function will be removed in version 0.7 and will be replaced with a more flexible option based on thefmt.Formatterinterface.Many thanks to @ChrisHines for inspiration, via his go-stack/stack package, and for his thoughtful review feedback.
Deprecation notice
The following symbols have been deprecated and will be removed in future releases.
errors.Fprintfwill be removed in the 0.7 release. Read on for more details.Locationinterface,is deprecated and will not be recognised in future releases. The replacement is
That is, pass the topmost element of error's stack trace (assuming it has a
Stacktrace() []Framemethod) tofmtand print it with the%+vverb.Stackinterface,is deprecated and will not be recognised in future releases. Callers should use the new
Stacktraceinterface described below.New features
Stacktraceinterface. As a replacement for the deprecatedStack() []uintptrinterface, implementations in this package now support aStacktraceinterfaceCalling this method returns a slice of
Framevalues, the most recent on the top. See #37Framevalues replace rawuintptr's (representing program counters) providing a type which implement thefmt.Formatterinterface, which in turn exposes various aspect of a call frame (name, source file and line, etc) via thefmtpackage. See also #37WrapandWrapfhas been renamed fromcausetoerr. This reflects the nature of these functions; to create a stack of errors. Apparently this also helps editor auto completion. Thanks @matryer. Fixes #32v0.5.1Compare Source
Bugs fixed
New,Errorf,Wrap,Wrapfwere not comparable with==. Thanks to @stevvooe. Fixes #29v0.5.0Compare Source
What's new
New,Errorf,Wrap, andWrapf, now store the stack trace of their caller (currently limited to a depth of 32). This can be retrieved by asserting for the following interfaceThe resulting
[]uintptris the same format asruntime.Callers. At the moment there are no helpers to inspect this information.v0.4.0Compare Source
What's new
errors.Printhelper, callers should useerrors.Fprint(os.Stderr, err)as a replacement. See #23 for detailsv0.3.0Compare Source
What's new
Errorfmethod, thanks @scorredoira, Fixes #13v0.2.0Compare Source
What's new
Wrapfmethod which takes the usual fmt.Printf arguments. Thanks @umairidris. Fixes #6Bug fixes since 0.1.0
Renovate configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.