We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04b4047 commit ee5f20bCopy full SHA for ee5f20b
internal/config/migration.go
@@ -4,6 +4,7 @@ import (
4
"github.com/blang/semver"
5
"github.com/pkg/errors"
6
"github.com/zeromake/docker-debug/version"
7
+ "sort"
8
"strings"
9
)
10
@@ -39,6 +40,9 @@ func MigrationConfig(conf *Config) error {
39
40
conf.MountDir = conf.MountDir[:l-1]
41
}
42
if v2.LT(v1) {
43
+ sort.Slice(migrationArr, func(i, j int) bool {
44
+ return migrationArr[i].Version.LT(migrationArr[j].Version)
45
+ })
46
for _, m := range migrationArr {
47
if v2.LT(m.Version) {
48
err = m.Up(conf)
0 commit comments