Skip to content

Commit

Permalink
Upgrade redis client to v4.
Browse files Browse the repository at this point in the history
ref: http://godoc.org/gopkg.in/redis.v4

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Sep 19, 2016
1 parent bf56f59 commit 9b5815f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type SectionStat struct {
type SectionRedis struct {
Addr string `yaml:"addr"`
Password string `yaml:"password"`
DB int64 `yaml:"db"`
DB int `yaml:"db"`
}

// SectionBoltDB is sub seciont of config.
Expand Down
4 changes: 2 additions & 2 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (suite *ConfigTestSuite) TestValidateConfDefault() {
assert.Equal(suite.T(), "memory", suite.ConfGorushDefault.Stat.Engine)
assert.Equal(suite.T(), "localhost:6379", suite.ConfGorushDefault.Stat.Redis.Addr)
assert.Equal(suite.T(), "", suite.ConfGorushDefault.Stat.Redis.Password)
assert.Equal(suite.T(), int64(0), suite.ConfGorushDefault.Stat.Redis.DB)
assert.Equal(suite.T(), 0, suite.ConfGorushDefault.Stat.Redis.DB)

assert.Equal(suite.T(), "gorush.db", suite.ConfGorushDefault.Stat.BoltDB.Path)
assert.Equal(suite.T(), "gorush", suite.ConfGorushDefault.Stat.BoltDB.Bucket)
Expand Down Expand Up @@ -149,7 +149,7 @@ func (suite *ConfigTestSuite) TestValidateConf() {
assert.Equal(suite.T(), "memory", suite.ConfGorush.Stat.Engine)
assert.Equal(suite.T(), "localhost:6379", suite.ConfGorush.Stat.Redis.Addr)
assert.Equal(suite.T(), "", suite.ConfGorush.Stat.Redis.Password)
assert.Equal(suite.T(), int64(0), suite.ConfGorush.Stat.Redis.DB)
assert.Equal(suite.T(), 0, suite.ConfGorush.Stat.Redis.DB)

assert.Equal(suite.T(), "gorush.db", suite.ConfGorush.Stat.BoltDB.Path)
assert.Equal(suite.T(), "gorush", suite.ConfGorush.Stat.BoltDB.Bucket)
Expand Down
14 changes: 4 additions & 10 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package: github.com/appleboy/gorush
import:
- package: gopkg.in/yaml.v2
- package: gopkg.in/redis.v3
- package: github.com/Sirupsen/logrus
version: v0.10.0
- package: gopkg.in/appleboy/gin-status-api.v1
Expand All @@ -20,3 +19,4 @@ import:
- package: github.com/thoas/stats
- package: github.com/tidwall/buntdb
- package: github.com/syndtr/goleveldb
- package: gopkg.in/redis.v4
2 changes: 1 addition & 1 deletion storage/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package redis

import (
"github.com/appleboy/gorush/config"
"gopkg.in/redis.v3"
"gopkg.in/redis.v4"
"log"
"strconv"
)
Expand Down

0 comments on commit 9b5815f

Please sign in to comment.