Skip to content

Storing arbitrary bytes in Redis #173

Answered by rueian
cinderrrr asked this question in Q&A
Discussion options

You must be logged in to vote

Redis string is binary safe. So yes, you can store arbitrary Go byte slice as Go string without special encoding.

And rueidis.BinaryString() can help you do the conversion without memory copy.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@cinderrrr
Comment options

@rueian
Comment options

@0x079
Comment options

@rueian
Comment options

@cinderrrr
Comment options

Answer selected by cinderrrr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants