vburenin / ifacemaker

Generate interfaces from structure methods.
Apache License 2.0
325 stars 43 forks source link

Copy imports from source file #6

Closed nkovacs closed 7 years ago

nkovacs commented 7 years ago

If you have multiple packages with the same name, goimports sometimes chooses the wrong package. (https://github.com/golang/go/issues/17557). A fix for that is in the works, but there are going to be other cases where goimports can't make a good choice.

I think it would be better to copy all the imports from the source file, then let goimports remove the ones that are not needed.