Skip to content

Commit

Permalink
Refactored
Browse files Browse the repository at this point in the history
  • Loading branch information
moredure committed Feb 1, 2019
1 parent e0292c1 commit 8e2862f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module gitlab.com/microredis/migrator
require (
github.com/go-redis/redis v6.15.1+incompatible
github.com/google/wire v0.2.0
github.com/microredis/tools v0.0.0-20190110212942-e344d1ec4efe
github.com/microredis/tools v0.0.0-20190201210438-43efa59d2185
golang.org/x/tools v0.0.0-20190110211028-68c5ac90f574 // indirect
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ github.com/microredis/tools v0.0.0-20190110175036-524ffa60acd4 h1:hN64+34woWytF3
github.com/microredis/tools v0.0.0-20190110175036-524ffa60acd4/go.mod h1:QgZ583LHnlOJ1jC5pgUIsMNrrSfqZDLNDcHR4JruiJo=
github.com/microredis/tools v0.0.0-20190110212942-e344d1ec4efe h1:Bgdw0Sef9H5kbKd09NzlnamcqfbBhOwuVGW03M5aDdA=
github.com/microredis/tools v0.0.0-20190110212942-e344d1ec4efe/go.mod h1:QgZ583LHnlOJ1jC5pgUIsMNrrSfqZDLNDcHR4JruiJo=
github.com/microredis/tools v0.0.0-20190201210438-43efa59d2185 h1:v5qwEisOl/HvG4HXaSLeQCHTHN24LtO0O+xLipfuEyU=
github.com/microredis/tools v0.0.0-20190201210438-43efa59d2185/go.mod h1:QgZ583LHnlOJ1jC5pgUIsMNrrSfqZDLNDcHR4JruiJo=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
golang.org/x/tools v0.0.0-20181017214349-06f26fdaaa28 h1:vnbqcYKfOxPnXXUlBo7t+R4pVIh0wInyOSNxih1S9Dc=
Expand Down
4 changes: 2 additions & 2 deletions redis_migrator.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"github.com/microredis/tools/closer"
"log"
"net"
)
Expand All @@ -12,8 +13,7 @@ type redisMigrator struct {
}

func (m *redisMigrator) Migrate() {
defer m.From.Close()
defer m.To.Close()
defer closer.MustClose(m.To, m.From)
log.Println("Started...")
m.prepareTo()
log.Println("Waiting...")
Expand Down

0 comments on commit 8e2862f

Please sign in to comment.