bolt/branch_node.go

17 lines
248 B
Go
Raw Normal View History

2014-01-08 15:06:17 +00:00
package bolt
import (
"unsafe"
)
2014-01-08 15:06:17 +00:00
const (
bigNode = 0x01
subNode = 0x02
dupNode = 0x04
)
// key returns a byte slice that of the key data.
func (n *branchNode) key() []byte {
return (*[MaxKeySize]byte)(unsafe.Pointer(&n.data))[:n.keySize]
2014-01-08 15:06:17 +00:00
}