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
following the convention that standard library imports are placed first. (This convention is followed by goimports when stdlib dependencies are mixed in with another block, as well as being mentioned on GitHub at https://github.com/golang/go/wiki/CodeReviewComments#imports)
DylanSpOddball
changed the title
x/tools/cmd/goimports
x/tools/cmd/goimports doesn't reorder standard library imports if they're already in separate blocks
Jan 5, 2022
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes (1.17.5 is the latest release, as of filing this issue)
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Use
goimports
to reorder imports, expecting to see standard library dependencies placed above other dependencies.main.go
:Command run:
goimports main.go
What did you expect to see?
I expected to see
following the convention that standard library imports are placed first. (This convention is followed by
goimports
when stdlib dependencies are mixed in with another block, as well as being mentioned on GitHub at https://github.com/golang/go/wiki/CodeReviewComments#imports)What did you see instead?
No changes:
Other notes
goimports
is supposed to do from the documentation. If this is working as designed, it'd be helpful to note that in the docs.The text was updated successfully, but these errors were encountered: