You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
453 B
Go
26 lines
453 B
Go
8 years ago
|
package ent
|
||
|
|
||
|
import (
|
||
|
"github.com/jordanorelli/hyperstone/bit"
|
||
|
)
|
||
|
|
||
|
type slotted interface {
|
||
|
getSlotValue(int) interface{}
|
||
|
setSlotValue(int, interface{})
|
||
|
getSlotDecoder(int) decoder
|
||
|
}
|
||
|
|
||
|
func fillSlots(dest slotted, sr *selectionReader, br bit.Reader) error {
|
||
|
selections, err := sr.readSelections(br, htree)
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
for _, s := range selections {
|
||
|
if err := s.fill(dest, br); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
}
|
||
|
return nil
|
||
|
}
|