update the examples

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-11 12:59:46 -07:00
parent bf5ff90e5b
commit f6018c0960
3 changed files with 7 additions and 6 deletions

View File

@ -11,11 +11,12 @@ import "strconv"
// import "flag" // import "flag"
import "github.com/golang/protobuf/proto" import "github.com/golang/protobuf/proto"
import pb "git.wit.com/jcarr/witProtobuf" import pb "git.wit.com/wit/witProtobuf"
func main() { func main() {
msg := new(pb.Event) msg := pb.CreateSampleEvent()
msg.Name = "hello jeff" msg.Name = "from dnssecsockettest()"
data, err := proto.Marshal(msg) data, err := proto.Marshal(msg)
if (err != nil) { if (err != nil) {
log.Printf("something fucked up happened") log.Printf("something fucked up happened")

View File

@ -8,7 +8,7 @@ import "io"
import "bytes" import "bytes"
import "github.com/golang/protobuf/proto" 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) { func processEvents(mychannel chan *pb.Event) {
for { for {

View File

@ -8,7 +8,7 @@ import "bufio"
import "io/ioutil" import "io/ioutil"
import "github.com/golang/protobuf/proto" 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 // Main reads the entire address book from a file and prints all the
// information inside. // information inside.
@ -54,7 +54,7 @@ func TestWriteEvent() {
Id: 1234, Id: 1234,
Name: "jcarrEvent1", Name: "jcarrEvent1",
Email: "jcarr@wit.com", Email: "jcarr@wit.com",
Result: []*pb.Response{ Results: []*pb.Response{
{Name: "555-4321", Type: pb.EventType_ADD}, {Name: "555-4321", Type: pb.EventType_ADD},
}, },
} }