Skip to content
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

hashicorp/go-multierror problem #369

Closed
somdutt-vmware opened this issue Apr 7, 2020 · 3 comments
Closed

hashicorp/go-multierror problem #369

somdutt-vmware opened this issue Apr 7, 2020 · 3 comments

Comments

@somdutt-vmware
Copy link

Describe the Bug
golang-migrate fails with the following:
Loading golang-migrate

github.com/hashicorp/go-multierror

/go/src/github.com/hashicorp/go-multierror/multierror.go:112:9: undefined: errors.As
/go/src/github.com/hashicorp/go-multierror/multierror.go:117:9: undefined: errors.Is

Steps to Reproduce
Steps to reproduce the behavior:

  1. My migrations look like:
    migrate -database "postgres://${PGHOST}/${PGDATABASE}?user=${PGUSER}&password=${PGPASSWORD}" -path ./scripts/migrations up 2>&1
    Error
    Loading golang-migrate

github.com/hashicorp/go-multierror

/go/src/github.com/hashicorp/go-multierror/multierror.go:112:9: undefined: errors.As
/go/src/github.com/hashicorp/go-multierror/multierror.go:117:9: undefined: errors.Is

Expected Behavior
golang-migrate shouldn't have issues with multi-error, it has been fixed in v1.1.0 recently (6 days ago)

Migrate Version
Must use multierror version v1.1.0 instead of v1.0.0

** Driver**
PostgreSQL

Go Version
1.13.9

@dhui
Copy link
Member

dhui commented Apr 8, 2020

To be clear, migrate doesn't have issues with multierror.

What versions of migrate and multierror are you using? My guess is that your code is using multierror v1.1.0 while migrate is using v1.0.0. It looks like As() and Is() were added in multierror v1.1.0. Feel free to open a PR for the fix.

@jmramos02
Copy link
Contributor

Hi @dhui ! i submitted a pr for upgrading the multierror.

Thanks!

@dhui
Copy link
Member

dhui commented Apr 15, 2020

Thanks for the fix @jmramos02 !

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

No branches or pull requests

3 participants