StaticSetMembers returns the refs in the "members" field if b is a valid "static-set" schema. Note that if it is a large static-set, the members are actually spread as subsets in "mergeSets". See StaticSetMergeSets.
()
| 155 | // "static-set" schema. Note that if it is a large static-set, the members are |
| 156 | // actually spread as subsets in "mergeSets". See StaticSetMergeSets. |
| 157 | func (b *Blob) StaticSetMembers() []blob.Ref { |
| 158 | if b.Type() != TypeStaticSet { |
| 159 | return nil |
| 160 | } |
| 161 | |
| 162 | s := make([]blob.Ref, 0, len(b.ss.Members)) |
| 163 | for _, ref := range b.ss.Members { |
| 164 | if ref.Valid() { |
| 165 | s = append(s, ref) |
| 166 | } |
| 167 | } |
| 168 | return s |
| 169 | } |
| 170 | |
| 171 | // StaticSetMergeSets returns the refs of the static-sets in "mergeSets". These |
| 172 | // are the subsets of all the static-set members in the case of a large directory. |