From b0fef1de1c3e3b32d253c68ed647e323f8403df0 Mon Sep 17 00:00:00 2001 From: Andrew Sisley Date: Mon, 8 Jul 2024 17:35:12 -0400 Subject: [PATCH] PR FIXUP - Document encoding funcs --- internal/core/encoding.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/core/encoding.go b/internal/core/encoding.go index 91d08653db..b7bc55f5ab 100644 --- a/internal/core/encoding.go +++ b/internal/core/encoding.go @@ -289,6 +289,7 @@ func EncodeIndexDataStoreKey(key *IndexDataStoreKey) []byte { return b } +// DecodeDataStoreKey decodes a store key into a [DataStoreKey]. func DecodeDataStoreKey(data []byte) (DataStoreKey, error) { if len(data) == 0 { return DataStoreKey{}, ErrEmptyKey @@ -340,6 +341,7 @@ func DecodeDataStoreKey(data []byte) (DataStoreKey, error) { }, nil } +// EncodeDataStoreKey encodes a [*DataStoreKey] to a byte array suitable for sorting in the store. func EncodeDataStoreKey(key *DataStoreKey) []byte { var result []byte