with imports like:
import "bytes"
import "encoding/binary"
and code that adds a dependency on another package, like bufio:
bufio.NewReader(os.Stdin)
goimports will rewrite the imports to look like:
import (
"bufio"
"bytes"
)
import "encoding/binary"
The formatting here is odd. I expected it to look like either:
import "bufio"
import "bytes"
import "encoding/binary"
where the established convention in the code of using import before every import is left alone or
import (
"bufio"
"bytes"
"encoding/binary"
)
where the convention of using grouped imports is properly done.