From 8169a6876245770f453e2cfe2517be91315bcf07 Mon Sep 17 00:00:00 2001 From: David Symonds Date: Sat, 21 Feb 2015 12:23:36 +1100 Subject: [PATCH] Update to match standard Go style. Remove completely unused dial options, and reorder a bit of code to match what real code would look like. --- go/greeter_client/main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/go/greeter_client/main.go b/go/greeter_client/main.go index abe33c0e2ad..3398040d7e5 100644 --- a/go/greeter_client/main.go +++ b/go/greeter_client/main.go @@ -49,19 +49,18 @@ const ( func main() { // Set up a connection to the server. - var opts []grpc.DialOption - conn, err := grpc.Dial(address, opts...) + conn, err := grpc.Dial(address) if err != nil { log.Fatalf("did not connect: %v", err) } defer conn.Close() + c := pb.NewGreeterClient(conn) // Contact the server and print out its response. name := defaultName if len(os.Args) > 1 { name = os.Args[1] } - c := pb.NewGreeterClient(conn) r, err := c.SayHello(context.Background(), &pb.HelloRequest{Name: name}) if err != nil { log.Fatalf("could not greet: %v", err)