From 1755c8d60fdc9e8aa3fa9423ecf994c6037927ae Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Tue, 18 Jul 2023 14:21:55 -0700 Subject: [PATCH] Fix typo in comment --- scripts/badger-migration/main.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/badger-migration/main.go b/scripts/badger-migration/main.go index afb74bbb..5d9ac448 100644 --- a/scripts/badger-migration/main.go +++ b/scripts/badger-migration/main.go @@ -258,8 +258,8 @@ func badgerIterate(it Iterator, prefix []byte, fn func(bucket, key, value []byte return badgerKey, nil } -// badgerEncode encodes a byte slice into a section of a BadgerKey. -// See documentation for toBadgerKey. +// badgerEncode encodes a byte slice into a section of a BadgerKey. See +// documentation for toBadgerKey. func badgerEncode(val []byte) ([]byte, error) { l := len(val) switch { @@ -301,10 +301,10 @@ func parseBadgerEncode(bk []byte) (value, rest []byte) { } } -// isBadgerTable returns True if the slice is a badgerTable token, false otherwise. -// badgerTable means that the slice contains only the [size|value] of one section -// of a badgerKey and no remainder. A badgerKey is [buket|key], while a badgerTable -// is only the bucket section. +// isBadgerTable returns True if the slice is a badgerTable token, false +// otherwise. badgerTable means that the slice contains only the [size|value] of +// one section of a badgerKey and no remainder. A badgerKey is [bucket|key], +// while a badgerTable is only the bucket section. func isBadgerTable(bk []byte) bool { if k, rest := parseBadgerEncode(bk); len(k) > 0 && len(rest) == 0 { return true @@ -312,8 +312,8 @@ func isBadgerTable(bk []byte) bool { return false } -// fromBadgerKey returns the bucket and key encoded in a BadgerKey. -// See documentation for toBadgerKey. +// fromBadgerKey returns the bucket and key encoded in a BadgerKey. See +// documentation for toBadgerKey. func fromBadgerKey(bk []byte) ([]byte, []byte, error) { bucket, rest := parseBadgerEncode(bk) if len(bucket) == 0 || len(rest) == 0 {