code: func writeEvents(client *goes.Client, streamName string) {
  	existingEvents := createTestEvents(10, streamName, serverURL, "FooEvent")
  
  	writer := client.NewStreamWriter(streamName)
  	err := writer.Append(nil, existingEvents...)
  	if err != nil {
  		log.Fatal(err)
  	}
  
  	ticker := time.NewTicker(time.Second * 2)
  	go func() {
  		for _ = range ticker.C {
  			num := rand.Intn(5)
  			newEvents := createTestEvents(num, streamName, serverURL, "FooEvent")
  			writer.Append(nil, newEvents...)
  		}
  	}()
  
  }
docs: // writeEvents will create an initial set of events and then write them to
  // the eventstore.
  // At two second intervals a random number of events between 1 and 5 will be written
  // to the eventstore.