code: func findNextPartitionID(currentPartition int64, defs []model.PartitionDefinition) (int64, error) {
  	for i, def := range defs {
  		if currentPartition == def.ID {
  			if i == len(defs)-1 {
  				return 0, nil
  			}
  			return defs[i+1].ID, nil
  		}
  	}
  	return 0, errors.Errorf("partition id not found %d", currentPartition)
  }
docs: // findNextPartitionID finds the next partition ID in the PartitionDefinition array.
  // Returns 0 if current partition is already the last one.