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

Add support for Go modules #35

Closed
wants to merge 1 commit into from

Conversation

nmiyake
Copy link

@nmiyake nmiyake commented Jan 9, 2019

Use golang.org/x/tools/go/packages to load packages.
Fixes #34.

Use golang.org/x/tools/go/packages to load packages.
Fixes mdempsky#34.
@nmiyake
Copy link
Author

nmiyake commented Jan 9, 2019

I believe the logic here is correct, although it's hard to tell if this maintains correctness in all cases due to the repo's lack of tests.

However, it does properly fix/address the basic case described in #34: after building with this fix, unconvert properly flags the error in the Go module:

➜  $GOPATH/src/github.com/mdempsky/unconvert/unconvert .
/Volumes/git/go-mod-playground/test-mod/main.go:1:85: unnecessary conversion

@nmiyake
Copy link
Author

nmiyake commented Jan 9, 2019

Oops, did not see #32 -- that change looks more comprehensive and was opened earlier, so closing this PR and will iterate/comment on that PR as needed.

@nmiyake nmiyake closed this Jan 9, 2019
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.

1 participant