File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 8
8
"net/url"
9
9
"os"
10
10
"path/filepath"
11
+ "strconv"
11
12
"strings"
12
13
"time"
13
14
@@ -398,15 +399,15 @@ func RegisterCache() {
398
399
var redisConfig struct {
399
400
Conn string `json:"conn"`
400
401
Password string `json:"password"`
401
- DbNum int `json:"dbNum"`
402
+ DbNum string `json:"dbNum"`
402
403
}
403
- redisConfig .DbNum = 0
404
+ redisConfig .DbNum = "0"
404
405
redisConfig .Conn = web .AppConfig .DefaultString ("cache_redis_host" , "" )
405
406
if pwd := web .AppConfig .DefaultString ("cache_redis_password" , "" ); pwd != "" {
406
407
redisConfig .Password = pwd
407
408
}
408
409
if dbNum := web .AppConfig .DefaultInt ("cache_redis_db" , 0 ); dbNum > 0 {
409
- redisConfig .DbNum = dbNum
410
+ redisConfig .DbNum = strconv . Itoa ( dbNum )
410
411
}
411
412
412
413
bc , err := json .Marshal (& redisConfig )
You can’t perform that action at this time.
0 commit comments