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
func init() {
if p := os.Getenv("REDIS_PORT"); p != "" {
if h := os.Getenv("REDIS_HOST"); h != "" {
storeConfig.Addr = h + ":" + p
}
if v := os.Getenv("REDIS_PORT"); v != "" {
storeConfig.Addr = "localhost:" + v
}
}