What version of Go are you using (go version)?
go version go1.16.5 windows/amd64
Does this issue reproduce with the latest release?
Yes
What did you do?
The order of the imports is not something that "matters" to developers, yet the developers will comment during code reviews to order them the right way. Why? There is literally no reason for having them in a specific order other than the "look" of them.
Furthermore, by having them manually fiddled with, it causes avoidable merge issues.
Currently, the imports are ordered but by block only. If I separate my imports in different blocks, they will be all left untouched. It will take the solo import lines and sort them correctly. So there is some kind of logic applied so it "looks" good, but it should go all the way opiniated and not allow the dev to order them the way they want.
What did you expect to see?
import (
"flag"
"fmt"
"log"
"net/http"
"os"
"strings"
"time"
_ "github.com/fake-a/package"
"github.com/fake-b/package"
fakeZ "github.com/fake-z/package"
}
What did you see instead?
import (
"fmt"
"log"
"flag"
"net/http"
"os"
"strings"
"time"
fakeZ "github.com/fake-z/package"
_ "github.com/fake-a/package"
"github.com/fake-b/package"
}
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
Yes
What did you do?
The order of the imports is not something that "matters" to developers, yet the developers will comment during code reviews to order them the right way. Why? There is literally no reason for having them in a specific order other than the "look" of them.
Furthermore, by having them manually fiddled with, it causes avoidable merge issues.
Currently, the imports are ordered but by block only. If I separate my imports in different blocks, they will be all left untouched. It will take the solo import lines and sort them correctly. So there is some kind of logic applied so it "looks" good, but it should go all the way opiniated and not allow the dev to order them the way they want.
What did you expect to see?
What did you see instead?