go get github.com/fgrzl/lexkeykey := lexkey.Encode("user", int64(123), true)
fmt.Println(key.ToHexString())k1 := lexkey.Encode("apple")
k2 := lexkey.Encode("banana")
ordered := bytes.Compare(k1, k2) < 0 // truepk := lexkey.NewPrimaryKey(
lexkey.Encode("tenant", tenantID), // partition
lexkey.Encode("user", userID), // row
)prefix := lexkey.Encode("orders", shopID)
from := lexkey.EncodeFirst(prefix)
to := lexkey.EncodeLast(prefix)
// use from/to with kv.Query range operatorsdata, _ := json.Marshal(key) // hex string formSee SPEC.md for encoding details.