Skip to content

Commit 8d28369

Browse files
jbenetStebalien
authored andcommitted
rm leftover backward param
1 parent 87985f2 commit 8d28369

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

main.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func GetIpfsDir() (string, error) {
6565
return "", err
6666
}
6767

68-
func runMigration(from int, to int, backward bool) error {
68+
func runMigration(from int, to int) error {
6969
fmt.Printf("===> Running migration %d to %d...\n", from, to)
7070
path, err := GetIpfsDir()
7171
if err != nil {
@@ -92,14 +92,13 @@ func runMigration(from int, to int, backward bool) error {
9292
}
9393

9494
func doMigrate(from, to int) error {
95-
backward := from > to
9695
step := 1
97-
if backward {
96+
if from > to {
9897
step = -1
9998
}
10099

101100
for cur := from; cur != to; cur += step {
102-
err := runMigration(cur, cur + step, backward)
101+
err := runMigration(cur, cur + step)
103102
if err != nil {
104103
return err
105104
}

0 commit comments

Comments
 (0)