diff --git a/examples/helloworld/greeter_server/main.go b/examples/helloworld/greeter_server/main.go index 728bb19fd..7a62a9b9f 100644 --- a/examples/helloworld/greeter_server/main.go +++ b/examples/helloworld/greeter_server/main.go @@ -47,7 +47,7 @@ func (s *server) SayHello(ctx context.Context, in *pb.HelloRequest) (*pb.HelloRe func main() { flag.Parse() - lis, err := net.Listen("tcp", fmt.Sprintf("localhost:%d", *port)) + lis, err := net.Listen("tcp", fmt.Sprintf(":%d", *port)) if err != nil { log.Fatalf("failed to listen: %v", err) }