Skip to content

Commit

Permalink
Merge pull request #7 from NEEXP/main
Browse files Browse the repository at this point in the history
fix typo: Prot -> Port
  • Loading branch information
htdcx authored Sep 19, 2024
2 parents 1bebf87 + 056cf5f commit 0098c88
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ vi (app.json or app.dev.json or app.prod.json)
},
"Redis": {
"Host": "127.0.0.1",
"Prot": 6379,
"Port": 6379,
"DBIndex": 0,
"UserName": "",
"Password": ""
Expand Down
2 changes: 1 addition & 1 deletion config/app.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"Redis": {
"Host": "127.0.0.1",
"Prot": 6379,
"Port": 6379,
"DBIndex": 0,
"UserName": "",
"Password": ""
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type dbConfigObj struct {
}
type redisConfig struct {
Host string
Prot uint
Port uint
DBIndex uint
UserName string
Password string
Expand Down
2 changes: 1 addition & 1 deletion db/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func GetRedis() (redisD *redis.Client, err error) {
}
redisConfig := config.GetConfig().Redis
redisDB = redis.NewClient(&redis.Options{
Addr: redisConfig.Host + ":" + strconv.Itoa(int(redisConfig.Prot)),
Addr: redisConfig.Host + ":" + strconv.Itoa(int(redisConfig.Port)),
Username: redisConfig.UserName,
Password: redisConfig.Password,
DB: int(redisConfig.DBIndex),
Expand Down

0 comments on commit 0098c88

Please sign in to comment.