Categorygithub.com/google/orderedcode
modulepackage
0.0.1
Repository: https://github.com/google/orderedcode.git
Documentation: pkg.go.dev

# README

orderedcode

orderedcode provides a byte encoding of a sequence of typed items. The resulting bytes can be lexicographically compared to yield the same ordering as item-wise comparison on the original sequences.

This is particularly useful for specifying the order of rows in a database with lexicographically ordered string keys, such as Bigtable.

See the package documentation in orderedcode.go for details and examples.

# Functions

Append appends the encoded representations of items to buf.
Decr wraps a value so that it is encoded or decoded in decreasing order.
Parse parses the next len(items) of their respective types and returns any remaining encoded data.

# Variables

Infinity is an encodable value that sorts greater than any other string.

# Structs

StringOrInfinity is a union type.

# Type aliases

TrailingString is a string that, if present, must be the last item appended or parsed.