func (ds PartitionDetails) NumReplicas() int {
	for _, p := range ds {
		return len(p.Replicas)
	}
	return 0
}
NumReplicas returns the number of replicas for these partitions

It is assumed that all partitions have the same number of replicas, so this
simply returns the number of replicas in the first encountered partition.
package kadm
import (
	"bytes"
	"context"
	"encoding/base64"
	"fmt"
	"sort"
	"github.com/twmb/franz-go/pkg/kerr"
	"github.com/twmb/franz-go/pkg/kgo"
	"github.com/twmb/franz-go/pkg/kmsg"
)
type TopicID [16]byte
func (t TopicID) String() string { return base64.StdEncoding.EncodeToString(t[:]) }
func (t TopicID) MarshalJSON() ([]byte, error) { return []byte(`"` + t.String() + `"`), nil }
func (t TopicID) Less(other TopicID) bool {
	return bytes.Compare(t[:], other[:]) == -1
}
type PartitionDetail struct {
	Topic     string  
	Partition int32   
	Leader          int32    
	LeaderEpoch     int32    
	Replicas        []int32  
	ISR             []int32  
	OfflineReplicas []int32  
	Err error  
}
type PartitionDetails map[int32]PartitionDetail
func (ds PartitionDetails) Sorted() []PartitionDetail {
	s := make([]PartitionDetail, 0, len(ds))
	for _, d := range ds {
		s = append(s, d)
	}
	sort.Slice(s, func(i, j int) bool { return s[i].Partition < s[j].Partition })
	return s
}
func (ds PartitionDetails) Numbers() []int32 {
	all := make([]int32, 0, len(ds))
	for p := range ds {
		all = append(all, p)
	}
	return int32s(all)
}