From f6018c096083d216850b1d470cba68203fcc0119 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 11 May 2019 12:59:46 -0700 Subject: [PATCH] update the examples Signed-off-by: Jeff Carr --- example-channel-goroutine/client.go | 7 ++++--- example-channel-goroutine/server.go | 2 +- example-protobuf/main.go | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/example-channel-goroutine/client.go b/example-channel-goroutine/client.go index a582083..a247506 100644 --- a/example-channel-goroutine/client.go +++ b/example-channel-goroutine/client.go @@ -11,11 +11,12 @@ import "strconv" // import "flag" import "github.com/golang/protobuf/proto" -import pb "git.wit.com/jcarr/witProtobuf" +import pb "git.wit.com/wit/witProtobuf" func main() { - msg := new(pb.Event) - msg.Name = "hello jeff" + msg := pb.CreateSampleEvent() + msg.Name = "from dnssecsockettest()" + data, err := proto.Marshal(msg) if (err != nil) { log.Printf("something fucked up happened") diff --git a/example-channel-goroutine/server.go b/example-channel-goroutine/server.go index 7d06cc7..5c5f366 100644 --- a/example-channel-goroutine/server.go +++ b/example-channel-goroutine/server.go @@ -8,7 +8,7 @@ import "io" import "bytes" import "github.com/golang/protobuf/proto" -import pb "git.wit.com/jcarr/witProtobuf" +import pb "git.wit.com/wit/witProtobuf" func processEvents(mychannel chan *pb.Event) { for { diff --git a/example-protobuf/main.go b/example-protobuf/main.go index aa6cd09..72d371b 100644 --- a/example-protobuf/main.go +++ b/example-protobuf/main.go @@ -8,7 +8,7 @@ import "bufio" import "io/ioutil" import "github.com/golang/protobuf/proto" -import pb "git.wit.com/jcarr/witProtobuf" +import pb "git.wit.com/wit/witProtobuf" // Main reads the entire address book from a file and prints all the // information inside. @@ -54,7 +54,7 @@ func TestWriteEvent() { Id: 1234, Name: "jcarrEvent1", Email: "jcarr@wit.com", - Result: []*pb.Response{ + Results: []*pb.Response{ {Name: "555-4321", Type: pb.EventType_ADD}, }, }