Skip to content

Commit

Permalink
PR FIXUP - Document encoding funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSisley committed Jul 8, 2024
1 parent 0488b30 commit b0fef1d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/core/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit b0fef1d

Please sign in to comment.