gotests
gotests copied to clipboard
Do not overwrite "import groups" in the generate output
Currently if we when gotests generates tests on an existing test file, it rewrite completely the imports with a default ordering.
example:
package client
import (
"fmt"
"errors"
"k8s.io/pkg/api"
)
// code here...
gotests output:
package client
import (
"k8s.io/pkg/api"
"fmt"
"errors"
)
// code here...
it will be nice if "gotests" works like "goimport" and so the "import groups" are not remove.
This is a known issue with gotests, but something that should be fixable. gotests uses golang.org/x/tools/imports under the hood just like goimports, so it's not clear to me why the import groups are removed.