1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

feat: add ClientName option

Signed-off-by: monkey92t <golang@88.com>
This commit is contained in:
monkey92t
2022-12-28 22:14:52 +08:00
parent f70c952806
commit a872c35b1a
11 changed files with 121 additions and 15 deletions

View File

@ -59,6 +59,9 @@ func TestParseURL(t *testing.T) {
}, {
url: "redis://localhost:123/?db=2&conn_max_idle_time", // missing "=" at the end
o: &Options{Addr: "localhost:123", DB: 2, ConnMaxIdleTime: 0},
}, {
url: "redis://localhost:123/?db=2&client_name=hi", // client name
o: &Options{Addr: "localhost:123", DB: 2, ClientName: "hi"},
}, {
url: "unix:///tmp/redis.sock",
o: &Options{Addr: "/tmp/redis.sock"},