MCPcopy Create free account
hub / github.com/devfeel/dotweb / parseRedisURL

Function parseRedisURL

framework/redis/redisutil.go:40–49  ·  view source on GitHub ↗

parseRedisURL parses redis URL and returns options

(redisURL string)

Source from the content-addressed store, hash-verified

38
39// parseRedisURL parses redis URL and returns options
40func parseRedisURL(redisURL string) *redis.Options {
41 opts, err := redis.ParseURL(redisURL)
42 if err != nil {
43 // Return default options if parse fails
44 return &redis.Options{
45 Addr: redisURL,
46 }
47 }
48 return opts
49}
50
51// newClient creates a new go-redis client
52func newClient(redisURL string, maxIdle, maxActive int) *redis.Client {

Callers 1

newClientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected