mirror of
https://github.com/gofiber/storage.git
synced 2025-10-04 16:22:52 +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 {
|
||||
// trim the scheme from the URI
|
||||
cfg.Addrs = []string{strings.TrimPrefix(uri, "redis://")}
|
||||
// trim the schemes from the URI
|
||||
addr := strings.TrimPrefix(uri, "redis://")
|
||||
addr = strings.TrimPrefix(addr, "rediss://")
|
||||
cfg.Addrs = []string{addr}
|
||||
}
|
||||
|
||||
if settings.withURL {
|
||||
|
Reference in New Issue
Block a user