mirror of
https://github.com/status-im/consul.git
synced 2025-01-24 20:51:10 +00:00
state: use addNamespaceIndex again
This commit is contained in:
parent
af5c8e6243
commit
8591feb58a
@ -101,6 +101,12 @@ const null = "\x00"
|
|||||||
// indexBuilder is a buffer used to construct memdb index values.
|
// indexBuilder is a buffer used to construct memdb index values.
|
||||||
type indexBuilder bytes.Buffer
|
type indexBuilder bytes.Buffer
|
||||||
|
|
||||||
|
func newIndexBuilder(cap int) *indexBuilder {
|
||||||
|
buff := make([]byte, 0, cap)
|
||||||
|
b := bytes.NewBuffer(buff)
|
||||||
|
return (*indexBuilder)(b)
|
||||||
|
}
|
||||||
|
|
||||||
// String appends the string and a null terminator to the buffer.
|
// String appends the string and a null terminator to the buffer.
|
||||||
func (b *indexBuilder) String(v string) {
|
func (b *indexBuilder) String(v string) {
|
||||||
(*bytes.Buffer)(b).WriteString(v)
|
(*bytes.Buffer)(b).WriteString(v)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user