code: func setProducerRequiredAcks(cfg *Config) error {
  	switch cfg.RequiredAcks {
  	case NoResponse:
  		cfg.ProducerConfig().Producer.RequiredAcks = sarama.NoResponse
  		return nil
  	case WaitForLocal:
  		cfg.ProducerConfig().Producer.RequiredAcks = sarama.WaitForLocal
  		return nil
  	case WaitForAll:
  		cfg.ProducerConfig().Producer.RequiredAcks = sarama.WaitForAll
  		return nil
  	default:
  		return errors.New("Invalid RequiredAcks type")
  	}
  }
docs: // setProducerRequiredAcks set the RequiredAcks field for a producer