code: func (ref *Config) SetPartitioner(val string) {
  	switch val {
  	default:
  		ref.Errorf("Invalid partitioner %s - defaulting to ''", val)
  		fallthrough
  	case "":
  		if ref.Partition >= 0 {
  			ref.Partitioner = sarama.NewManualPartitioner
  		} else {
  			ref.Partitioner = sarama.NewHashPartitioner
  		}
  	case Hash:
  		ref.Partitioner = sarama.NewHashPartitioner
  		ref.Partition = -1
  	case Random:
  		ref.Partitioner = sarama.NewRandomPartitioner
  		ref.Partition = -1
  	case Manual:
  		ref.Partitioner = sarama.NewManualPartitioner
  		if ref.Partition < 0 {
  			ref.Infof("Invalid partition %d - defaulting to 0", ref.Partition)
  			ref.Partition = 0
  		}
  	}
  }
docs: // SetPartitioner sets the Config.SetPartitioner field