mirror of
https://github.com/gofiber/storage.git
synced 2025-10-05 08:37:10 +08:00
fix: trim both schemes
This commit is contained in:
@@ -139,8 +139,10 @@ func newTestStore(t testing.TB, opts ...testStoreOption) *Storage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if settings.withAddress {
|
if settings.withAddress {
|
||||||
// trim the scheme from the URI
|
// trim the schemes from the URI
|
||||||
cfg.Addrs = []string{strings.TrimPrefix(uri, "redis://")}
|
addr := strings.TrimPrefix(uri, "redis://")
|
||||||
|
addr = strings.TrimPrefix(addr, "rediss://")
|
||||||
|
cfg.Addrs = []string{addr}
|
||||||
}
|
}
|
||||||
|
|
||||||
if settings.withURL {
|
if settings.withURL {
|
||||||
|
Reference in New Issue
Block a user