Update redis_test.go

This commit is contained in:
Fenny
2020-11-04 02:38:18 +01:00
parent 47f25813d8
commit fc1752e20c

View File

@@ -12,10 +12,8 @@ import (
var storeConfig = ConfigDefault var storeConfig = ConfigDefault
func init() { func init() {
if p := os.Getenv("REDIS_PORT"); p != "" { if v := os.Getenv("REDIS_PORT"); v != "" {
if h := os.Getenv("REDIS_HOST"); h != "" { storeConfig.Addr = "localhost:" + v
storeConfig.Addr = h + ":" + p
}
} }
} }