forked from TrueCloudLab/certificates
Fix typo in comment
This commit is contained in:
parent
f7da9a6f30
commit
1755c8d60f
1 changed files with 8 additions and 8 deletions
|
@ -258,8 +258,8 @@ func badgerIterate(it Iterator, prefix []byte, fn func(bucket, key, value []byte
|
||||||
return badgerKey, nil
|
return badgerKey, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// badgerEncode encodes a byte slice into a section of a BadgerKey.
|
// badgerEncode encodes a byte slice into a section of a BadgerKey. See
|
||||||
// See documentation for toBadgerKey.
|
// documentation for toBadgerKey.
|
||||||
func badgerEncode(val []byte) ([]byte, error) {
|
func badgerEncode(val []byte) ([]byte, error) {
|
||||||
l := len(val)
|
l := len(val)
|
||||||
switch {
|
switch {
|
||||||
|
@ -301,10 +301,10 @@ func parseBadgerEncode(bk []byte) (value, rest []byte) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// isBadgerTable returns True if the slice is a badgerTable token, false otherwise.
|
// isBadgerTable returns True if the slice is a badgerTable token, false
|
||||||
// badgerTable means that the slice contains only the [size|value] of one section
|
// otherwise. badgerTable means that the slice contains only the [size|value] of
|
||||||
// of a badgerKey and no remainder. A badgerKey is [buket|key], while a badgerTable
|
// one section of a badgerKey and no remainder. A badgerKey is [bucket|key],
|
||||||
// is only the bucket section.
|
// while a badgerTable is only the bucket section.
|
||||||
func isBadgerTable(bk []byte) bool {
|
func isBadgerTable(bk []byte) bool {
|
||||||
if k, rest := parseBadgerEncode(bk); len(k) > 0 && len(rest) == 0 {
|
if k, rest := parseBadgerEncode(bk); len(k) > 0 && len(rest) == 0 {
|
||||||
return true
|
return true
|
||||||
|
@ -312,8 +312,8 @@ func isBadgerTable(bk []byte) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// fromBadgerKey returns the bucket and key encoded in a BadgerKey.
|
// fromBadgerKey returns the bucket and key encoded in a BadgerKey. See
|
||||||
// See documentation for toBadgerKey.
|
// documentation for toBadgerKey.
|
||||||
func fromBadgerKey(bk []byte) ([]byte, []byte, error) {
|
func fromBadgerKey(bk []byte) ([]byte, []byte, error) {
|
||||||
bucket, rest := parseBadgerEncode(bk)
|
bucket, rest := parseBadgerEncode(bk)
|
||||||
if len(bucket) == 0 || len(rest) == 0 {
|
if len(bucket) == 0 || len(rest) == 0 {
|
||||||
|
|
Loading…
Reference in a new issue