helper
v9.24.1
github.com/redis/go-redis/v9/helper
Documentation
pkg.go.dev ↗Functions
DigestBytes
func DigestBytes(data []byte) uint64
DigestBytes computes the xxh3 hash of the given byte slice. This produces the same hash as the Redis DIGEST command, allowing you to calculate digests client-side without making a Redis call. This is useful for optimistic locking with SetIFDEQ, SetIFDNE, and DelExArgs.
DigestString
func DigestString(s string) uint64
DigestString computes the xxh3 hash of the given string. This produces the same hash as the Redis DIGEST command, allowing you to calculate digests client-side without making a Redis call. This is useful for optimistic locking with SetIFDEQ, SetIFDNE, and DelExArgs.
MustParseFloat
func MustParseFloat(s string) float64
ParseFloat
func ParseFloat(s string) (float64, error)