@@ -27,7 +27,7 @@ func Up(pipe chan interface{}, url, migrationsPath string) {
27
27
28
28
applyMigrationFiles , err := files .ToLastFrom (version )
29
29
if err != nil {
30
- if err2 := d .Close (); err != nil {
30
+ if err2 := d .Close (); err2 != nil {
31
31
pipe <- err2
32
32
}
33
33
go pipep .Close (pipe , err )
@@ -42,14 +42,14 @@ func Up(pipe chan interface{}, url, migrationsPath string) {
42
42
break
43
43
}
44
44
}
45
- if err2 := d .Close (); err != nil {
46
- pipe <- err2
45
+ if err := d .Close (); err != nil {
46
+ pipe <- err
47
47
}
48
48
go pipep .Close (pipe , nil )
49
49
return
50
50
} else {
51
- if err2 := d .Close (); err != nil {
52
- pipe <- err2
51
+ if err := d .Close (); err != nil {
52
+ pipe <- err
53
53
}
54
54
go pipep .Close (pipe , nil )
55
55
return
@@ -74,7 +74,7 @@ func Down(pipe chan interface{}, url, migrationsPath string) {
74
74
75
75
applyMigrationFiles , err := files .ToFirstFrom (version )
76
76
if err != nil {
77
- if err2 := d .Close (); err != nil {
77
+ if err2 := d .Close (); err2 != nil {
78
78
pipe <- err2
79
79
}
80
80
go pipep .Close (pipe , err )
@@ -89,13 +89,13 @@ func Down(pipe chan interface{}, url, migrationsPath string) {
89
89
break
90
90
}
91
91
}
92
- if err2 := d .Close (); err != nil {
92
+ if err2 := d .Close (); err2 != nil {
93
93
pipe <- err2
94
94
}
95
95
go pipep .Close (pipe , nil )
96
96
return
97
97
} else {
98
- if err2 := d .Close (); err != nil {
98
+ if err2 := d .Close (); err2 != nil {
99
99
pipe <- err2
100
100
}
101
101
go pipep .Close (pipe , nil )
@@ -161,7 +161,7 @@ func Migrate(pipe chan interface{}, url, migrationsPath string, relativeN int) {
161
161
162
162
applyMigrationFiles , err := files .From (version , relativeN )
163
163
if err != nil {
164
- if err2 := d .Close (); err != nil {
164
+ if err2 := d .Close (); err2 != nil {
165
165
pipe <- err2
166
166
}
167
167
go pipep .Close (pipe , err )
@@ -176,13 +176,13 @@ func Migrate(pipe chan interface{}, url, migrationsPath string, relativeN int) {
176
176
break
177
177
}
178
178
}
179
- if err2 := d .Close (); err != nil {
179
+ if err2 := d .Close (); err2 != nil {
180
180
pipe <- err2
181
181
}
182
182
go pipep .Close (pipe , nil )
183
183
return
184
184
}
185
- if err2 := d .Close (); err != nil {
185
+ if err2 := d .Close (); err2 != nil {
186
186
pipe <- err2
187
187
}
188
188
go pipep .Close (pipe , nil )
0 commit comments