We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31bb813 commit cd5adbbCopy full SHA for cd5adbb
go/vt/topo/topoproto/srvkeyspace.go
@@ -51,6 +51,9 @@ func (sra ShardReferenceArray) Sort() { sort.Sort(sra) }
51
// SrvKeyspaceGetPartition returns a Partition for the given tablet type,
52
// or nil if it's not there.
53
func SrvKeyspaceGetPartition(sk *topodatapb.SrvKeyspace, tabletType topodatapb.TabletType) *topodatapb.SrvKeyspace_KeyspacePartition {
54
+ if sk == nil {
55
+ return nil
56
+ }
57
for _, p := range sk.Partitions {
58
if p.ServedType == tabletType {
59
return p
0 commit comments