package main import ( pb "git.ipng.ch/ipng/nginx-logtail/proto/logtailpb" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) func dial(addr string) (*grpc.ClientConn, pb.LogtailServiceClient, error) { conn, err := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { return nil, nil, err } return conn, pb.NewLogtailServiceClient(conn), nil }