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
However, my IDE is dumb and doesn't honor import blocks, instead inserting to the first block. I am expecting goimports to help with this and honor existing blocks of system, external and local blocks.
This behavior seems to happen whether an external import or local import is included in the first block. In fact, adding a local import to the external block we see similar behavior where instead of adding to the existing local block, it creates a new local block above the existing local block. Is this a bug or by design? I wish it worked differently if this is by design.
The text was updated successfully, but these errors were encountered:
gopherbot
added
the
Tools
This label describes issues relating to any tools in the x/tools repository.
label
May 26, 2021
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Unsure
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
then run:
goimports -local "github.com/local" -w file.go
works wonderfully:
However, my IDE is dumb and doesn't honor import blocks, instead inserting to the first block. I am expecting goimports to help with this and honor existing blocks of system, external and local blocks.
goimports -local "github.com/local" -w file.go
What did you expect to see?
What did you see instead?
This behavior seems to happen whether an external import or local import is included in the first block. In fact, adding a local import to the external block we see similar behavior where instead of adding to the existing local block, it creates a new local block above the existing local block. Is this a bug or by design? I wish it worked differently if this is by design.
The text was updated successfully, but these errors were encountered: