code: func closeProducer(producer *client.AsyncProducer) error {
  	// close producer
  	fmt.Println("closing producer ...")
  	err := producer.Close(true)
  	if err != nil {
  		fmt.Printf("AsyncProducer close errored: %v\n", err)
  		return err
  	}
  	return nil
  }
docs: // closeProducer uses the AsyncProducer.Close() API to close the producer.