code: func (t *Topic) parsePartitions(value []byte) (PartitionList, error) {
  	var tm topicMetadata
  	if err := json.Unmarshal(value, &tm); err != nil {
  		return nil, err
  	}
  
  	result := make(PartitionList, len(tm.Partitions))
  	for partitionNumber, replicas := range tm.Partitions {
  		partitionID, err := strconv.ParseInt(partitionNumber, 10, 32)
  		if err != nil {
  			return nil, err
  		}
  
  		replicaIDs := make([]int32, 0, len(replicas))
  		for _, r := range replicas {
  			replicaIDs = append(replicaIDs, int32(r))
  		}
  		result[partitionID] = t.Partition(int32(partitionID), replicaIDs)
  	}
  
  	return result, nil
  }
docs: // parsePartitions parses the JSON representation of the partitions
  // that is stored as data on the topic node in Zookeeper.