redis / go-redis

Redis Go client
https://redis.uptrace.dev
BSD 2-Clause "Simplified" License
19.6k stars 2.31k forks source link

Add `(*StatusCmd).Bytes()` method #3030

Closed haines closed 2 weeks ago

haines commented 2 weeks ago

When calling SetArgs with Get: true, it's useful to be able to read the result as bytes rather than a string (in the same way you would with Get). However, SetArgs returns *StatusCmd (which doesn't implement the Bytes() method) rather than *StringCmd (which does).

This PR adds a Bytes() method to *StatusCmd to support this use case.