mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-05-31 11:42:30 +00:00
gofmt
This commit is contained in:
parent
da6d48abe9
commit
dcc5c661e2
4
lnode.go
4
lnode.go
@ -17,11 +17,11 @@ type lnode struct {
|
|||||||
// key returns a byte slice of the node key.
|
// key returns a byte slice of the node key.
|
||||||
func (n *lnode) key() []byte {
|
func (n *lnode) key() []byte {
|
||||||
buf := (*[maxAllocSize]byte)(unsafe.Pointer(n))
|
buf := (*[maxAllocSize]byte)(unsafe.Pointer(n))
|
||||||
return buf[n.pos:n.pos+n.ksize]
|
return buf[n.pos : n.pos+n.ksize]
|
||||||
}
|
}
|
||||||
|
|
||||||
// value returns a byte slice of the node value.
|
// value returns a byte slice of the node value.
|
||||||
func (n *lnode) value() []byte {
|
func (n *lnode) value() []byte {
|
||||||
buf := (*[maxAllocSize]byte)(unsafe.Pointer(n))
|
buf := (*[maxAllocSize]byte)(unsafe.Pointer(n))
|
||||||
return buf[n.pos+n.ksize:n.pos+n.ksize+n.vsize]
|
return buf[n.pos+n.ksize : n.pos+n.ksize+n.vsize]
|
||||||
}
|
}
|
||||||
|
2
tpage.go
2
tpage.go
@ -6,7 +6,7 @@ import (
|
|||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
// tpage represents a temporary, in-memory leaf page.
|
// tpage represents a temporary in-memory leaf page.
|
||||||
// It is deserialized from an memory-mapped page and is not restricted by page size.
|
// It is deserialized from an memory-mapped page and is not restricted by page size.
|
||||||
type tpage struct {
|
type tpage struct {
|
||||||
nodes tnodes
|
nodes tnodes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user