parent
c9ad2d3b64
commit
bdcae0e3d3
|
@ -1,5 +1,6 @@
|
|||
build:
|
||||
go build
|
||||
./example-protobuf
|
||||
|
||||
prep:
|
||||
go get -v -t -u
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
package main
|
||||
|
||||
import "log"
|
||||
import "bytes"
|
||||
import "os"
|
||||
import "bufio"
|
||||
// import "io"
|
||||
import "io/ioutil"
|
||||
import (
|
||||
"bytes"
|
||||
"os"
|
||||
"bufio"
|
||||
"io/ioutil"
|
||||
|
||||
import "github.com/golang/protobuf/proto"
|
||||
import pb "git.wit.com/wit/witProtobuf"
|
||||
"go.wit.com/log"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
pb "go.wit.com/lib/protobuf/witProtobuf"
|
||||
)
|
||||
|
||||
//
|
||||
// writes out several files in /tmp/
|
||||
|
@ -23,9 +25,18 @@ func main() {
|
|||
}
|
||||
allEvents := &pb.Event{}
|
||||
if err := proto.Unmarshal(in, allEvents); err != nil {
|
||||
log.Fatalln("Failed to parse events:", err)
|
||||
log.Error(err, "Failed to parse events:")
|
||||
}
|
||||
|
||||
log.SetAll(true)
|
||||
log.Spew("Spew:", allEvents)
|
||||
log.Spew("Spew:", allEvents.Type)
|
||||
/*
|
||||
for i, e := range allEvents {
|
||||
log.Warn(i, e)
|
||||
}
|
||||
*/
|
||||
|
||||
// listPeople(os.Stdout, allEvents)
|
||||
// got := in.String()
|
||||
log.Println(in)
|
||||
|
|
Loading…
Reference in New Issue