go-redis
go-redis copied to clipboard
When the password for a Redis connection string contains an '@' symbol, the connection cannot be recognized
When the password for a Redis connection string contains an '@' symbol, the connection cannot be recognized, for example:
redis://:xxx!@[email protected]:6379/10
According to RFC 3986, section 3.2.1, it needs to be percent encoded:
userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
So you should try this:
redis://:xxx!%[email protected]:6379/10
using %40
instead @
Maybe this help? url.PathEscape