enhance log for hello world SayHello (#2538)

This PR adds a log to `SayHello`. This makes server logic more clear.
This commit is contained in:
Ning Xie
2018-12-28 04:40:13 +08:00
committed by Menghan Li
parent 7b14136291
commit 3961168004

View File

@ -39,6 +39,7 @@ type server struct{}
// SayHello implements helloworld.GreeterServer
func (s *server) SayHello(ctx context.Context, in *pb.HelloRequest) (*pb.HelloReply, error) {
log.Printf("Received: %v", in.Name)
return &pb.HelloReply{Message: "Hello " + in.Name}, nil
}