Make a sample set of protobufs

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-11 12:13:34 -07:00
parent d8ee7baced
commit e0efc237a4
1 changed files with 18 additions and 0 deletions

View File

@ -25,3 +25,21 @@ func CreateSampleEvent() *Event {
return e return e
} }
func CreateSampleEvents(total int) []Event {
// TODO: flush this out to do all the fields
log.Println("CreateSampleEvent() is generating %d protobuf Events", total)
var all []Event
for i := 0; i < total; i++ {
e := CreateSampleEvent()
e.Id += 1000 + int32(i)
e.Name = "jcarrEvent2"
all = append(all, *e)
}
return all
}