File tree Expand file tree Collapse file tree 5 files changed +91
-83
lines changed Expand file tree Collapse file tree 5 files changed +91
-83
lines changed Original file line number Diff line number Diff line change 11redis-migrator
22dist
3+ .test /
Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ var migrateCmd = &cobra.Command{
1111 Short : "Runs redis-migrator to run migration" ,
1212 Long : `Runs redis-migrator to run migration` ,
1313 Run : func (cmd * cobra.Command , args []string ) {
14- runMigration ()
14+ if err := runMigration (); err != nil {
15+ panic (err )
16+ }
1517 },
1618}
1719
@@ -20,7 +22,7 @@ func init() {
2022 rootCmd .AddCommand (migrateCmd )
2123}
2224
23- func runMigration () {
25+ func runMigration () error {
2426 data := config .ParseConfig (configFilePath )
25- migrator .MigrateRedisData (data )
27+ return migrator .MigrateRedisData (data )
2628}
Original file line number Diff line number Diff line change 11module redis-migrator
22
3- go 1.15
3+ go 1.21
44
55require (
6- github.com/go-redis/redis/v8 v8.4.2
76 github.com/gomodule/redigo v1.8.3
8- github.com/mitchellh/mapstructure v1.1.2
97 github.com/sirupsen/logrus v1.7.0
108 github.com/spf13/cobra v1.1.1
119 github.com/spf13/pflag v1.0.5
1210 gopkg.in/yaml.v2 v2.3.0
1311)
12+
13+ require (
14+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
15+ github.com/stretchr/testify v1.6.1 // indirect
16+ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f // indirect
17+ )
You can’t perform that action at this time.
0 commit comments