aboutsummaryrefslogtreecommitdiff
path: root/branch_node.go
blob: a5bd0714145c6212a586f0ebc9e130dea72a4488 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package bolt

import (
	"unsafe"
)

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]
}