From 72a3b4a33114a06b5be48b27604e4cce6edda031 Mon Sep 17 00:00:00 2001 From: iamqizhao Date: Thu, 27 Aug 2015 19:20:52 -0700 Subject: [PATCH] fix helloworld example --- examples/helloworld/greeter_client/main.go | 4 ++-- examples/helloworld/greeter_server/main.go | 2 +- examples/helloworld/{proto => helloworld}/helloworld.pb.go | 0 examples/helloworld/{proto => helloworld}/helloworld.proto | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename examples/helloworld/{proto => helloworld}/helloworld.pb.go (100%) rename examples/helloworld/{proto => helloworld}/helloworld.proto (100%) diff --git a/examples/helloworld/greeter_client/main.go b/examples/helloworld/greeter_client/main.go index fe882ae6..1e02ab15 100644 --- a/examples/helloworld/greeter_client/main.go +++ b/examples/helloworld/greeter_client/main.go @@ -37,7 +37,7 @@ import ( "log" "os" - pb "github.com/grpc/grpc-go/examples/helloworld" + pb "google.golang.org/grpc/examples/helloworld/helloworld" "golang.org/x/net/context" "google.golang.org/grpc" ) @@ -49,7 +49,7 @@ const ( func main() { // Set up a connection to the server. - conn, err := grpc.Dial(address) + conn, err := grpc.Dial(address, grpc.WithInsecure()) if err != nil { log.Fatalf("did not connect: %v", err) } diff --git a/examples/helloworld/greeter_server/main.go b/examples/helloworld/greeter_server/main.go index 793860e5..ba985df4 100644 --- a/examples/helloworld/greeter_server/main.go +++ b/examples/helloworld/greeter_server/main.go @@ -37,7 +37,7 @@ import ( "log" "net" - pb "github.com/grpc/grpc-go/examples/helloworld" + pb "google.golang.org/grpc/examples/helloworld/helloworld" "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/examples/helloworld/proto/helloworld.pb.go b/examples/helloworld/helloworld/helloworld.pb.go similarity index 100% rename from examples/helloworld/proto/helloworld.pb.go rename to examples/helloworld/helloworld/helloworld.pb.go diff --git a/examples/helloworld/proto/helloworld.proto b/examples/helloworld/helloworld/helloworld.proto similarity index 100% rename from examples/helloworld/proto/helloworld.proto rename to examples/helloworld/helloworld/helloworld.proto