incu6us / goimports-reviser

Right imports sorting & code formatting tool (goimports alternative)
MIT License
599 stars 72 forks source link

gRPC version higher than v1.59 failed #151

Open yeqown opened 8 months ago

yeqown commented 8 months ago

Env

go version: 1.19 os: darwin/arm64

Description

While my project contains the grpc versioned v1.61, goimports-reviser would faild with following message:

/Users/xxxx/.go/pkg/mod/google.golang.org/grpc@v1.60.1/internal/tcp_keepalive_unix.go:27:2: cannot find package
2024/03/05 16:58:51 Failed to fix file: package has an errors

I checked the file with the specified line which is image

I also checked the package golang.org/x/sys/unix in the go module folder, it exists.

Final fixed

I tried downgrade the gRPC to v1.59.0, the problem disappeared. Is this an issue of gRPC or goimports-reviser ?