Closed
Description
Hi there!
It seems like that goimports fails to resolve imported packages if their paths don't match their names but the latest binary from the upstream doesn't do that.
Here's the script to reproduce it:
export GO111MODULE=on
echo 'module goimports' > go.mod
mkdir sub
echo 'package subpkg
func Foo() {}' > sub/sub.go
echo 'package main
import "goimports/sub"
func main() {
subpkg.Foo()
}' > main.go
Run:
golangci-lint run --disable-all --enable=goimports
Output:
main.go:3: File is not `goimports`-ed (goimports)
import "goimports/sub"
Metadata
Metadata
Assignees
Labels
No labels