cannot use gRPC package when a vendored version exists in containerd. Here is a quick way to reproduce the problem
package main
import (
"flag"
"log"
"google.golang.org/grpc"
"github.com/containerd/containerd"
)
var (
serverAddr = flag.String("addr", "127.0.0.1:1338", "The server address in the format of host:port")
)
func main() {
gopts := []grpc.DialOption{
grpc.WithInsecure(),
}
conn, err := grpc.Dial(*serverAddr, gopts...)
client, err := containerd.NewWithConn(conn)
if err != nil {
log.Fatalf("can't connect to containerd: %v\n", err)
}
}
can't compile because
./main.go:22:39: cannot use conn (type *"google.golang.org/grpc".ClientConn) as type *"github.com/containerd/containerd/vendor/google.golang.org/grpc".ClientConn in argument to containerd.NewWithConn
similar issues:
cannot use gRPC package when a vendored version exists in containerd. Here is a quick way to reproduce the problem
can't compile because
similar issues: