ARTICLE AD BOX
I am working on a module called automat.
When I save my go file, it's being reformatted from:
package cmd import ( "context" "fmt" "os" "strings" "automat/pkg/app" "automat/pkg/business" "automat/pkg/util" }to
package cmd import ( "automat/pkg/app" "automat/pkg/business" "automat/pkg/util" "context" "fmt" "os" "strings" }It puts my local module imports at the top. I would like it to not doo that.
After some digging, I have identified that this is goimports which is doing that. After some more digging, I see that there is a -local string option for goimports. Using that option does not reformat.
I was going to set that - but then I realized that string - automat in my case - is, indeed, a "local" change. And I would have to apply this to each of my own module packages.
Why is goimports doing this? Is there a way to make it not do it? And if not, can I maybe have a local config option, which would allow me to have the local string option be set on each local workspace, and not have to fiddle with global options?
This is kind of a weird situation which I didn't think was happening before, but just recently realized.
