You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, I find myself needing both this tool and goimports. As far as I can tell, the only thing goimports does that go-groups does not is clean up unused imports. It would be nice if go-groups supported this as it would drop the need for goimports almost entirely.
It looks like go-groups would have to make the jump from string parsing to ast parsing the input source files to achieve this. I'll definitely look into this, but it's not a trivial improvement.
Activity
cnmcavoy commentedon Oct 27, 2020
Note for myself, the actual goimports logic to remove imports is here: https://github.com/golang/tools/blob/master/internal/imports/fix.go#L400
It looks like go-groups would have to make the jump from string parsing to ast parsing the input source files to achieve this. I'll definitely look into this, but it's not a trivial improvement.