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
mikioh
changed the title
tools/imports: packages with non-standard names deleted unless imported with explicit name
imports: packages with non-standard names deleted unless imported with explicit name
Feb 15, 2015
I think that workflow is not right. Are you sure you want to edit a source
file
without also running its tests?
And if you use go get to fetch a package, even if you don't go install
anything,
goimports will do the right thing.
rsc
changed the title
imports: packages with non-standard names deleted unless imported with explicit name
x/tools/imports: packages with non-standard names deleted unless imported with explicit name
Apr 14, 2015
This is a dup of #21143 and the reason goimports deletes the import is that goimports does not work well with imports containing - in a repository. The usecase is not supported and the fix is to use a named import.
Go imports deletes the termbox import in the following code:
A named import however works:
works fine.
If such package naming should be banned (could be a good idea) go vet could warn about them.
The text was updated successfully, but these errors were encountered: