Merge pull request #43 from dsymonds/patch-1

Update to match standard Go style.
pull/3109/head
Qi Zhao 10 years ago
commit aca819bdd6
  1. 5
      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)

Loading…
Cancel
Save