Skip to content

WIP: Merge Upstream back into fork #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

tomscholz
Copy link

This isn't a Hacktoberfest spam pull request!

Hello everybody,
what about merging the upstream back into the fork? pkg/errors seems to have added support for go 1.13 Unwrap, so I thought it would makes sense to keep the fork updated.

Cheers,
Tom

aperezg and others added 8 commits November 9, 2019 09:33
* Add support for Go 1.13 error chains

Go 1.13 adds support for error chains to the standard libary's errors
package. The new standard library functions require an Unwrap method to
be provided by an error type. This change adds a new Unwrap method
(identical to the existing Cause method) to the unexported error types.
* feat: support std errors functions

add function `Is`, `As` and `Unwrap`, like std errors, so that we can
continue to use pkg/errors with go1.13 compatibility

Signed-off-by: Sherlock Holo <[email protected]>

* style: delete useless comments

Signed-off-by: Sherlock Holo <[email protected]>

* build: update makefile

update makefile to download dependencies before test anything

Signed-off-by: Sherlock Holo <[email protected]>

* build: fix makefile

Signed-off-by: Sherlock Holo <[email protected]>

* chore: delete useless comments

Signed-off-by: Sherlock Holo <[email protected]>

* Restore Makefile

* revert: revert some change

some change are doing by PR #206 and #212 , so I don't need to do it

Signed-off-by: Sherlock Holo <[email protected]>

* test: add more check for As unit test

Signed-off-by: Sherlock Holo <[email protected]>

* revert: only support Is As Unwrap for >=go1.13

Signed-off-by: Sherlock Holo <[email protected]>

* feat(Unwrap): allow <go1.13 can use Unwrap

`Unwrap` just use type assert, it doesn't need go1.13 actually

Signed-off-by: Sherlock Holo <[email protected]>

* test: add go1.13 errors compatibility check

Signed-off-by: Sherlock Holo <[email protected]>

* refactor(Unwrap): don't allow <go1.13 use Unwrap

If we implement Unwrap ourselves, may create a risk of incompatibility
if Go 1.14 subtly changes its `Unwrap` implementation.
<go1.13 users doesn't have `Is` or `As`, if they want, they will use
xerrors and it also provides `Unwrap`

Signed-off-by: Sherlock Holo <[email protected]>
* remove unnecessary use of fmt.Sprintf
* Update .travis.yml

Adding Power & Updating the go versions to 1.13/1.14/1.15 as lower versions are not supported.

* Update .travis.yml

Removing go 1.13 as desired in the comment section,

* Update .travis.yml

As desired taking out the power(ppc64le) related support.,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants