Skip to content

Commit 2fa9bec

Browse files
committed
Merge branch 'migrate/master'
# Conflicts: # .golangci.yml
2 parents 608dabc + 2477f63 commit 2fa9bec

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ run:
44
linters:
55
enable:
66
#- golint
7-
# interfacer
7+
#- interfacer
88
- unconvert
99
#- dupl
1010
- goconst

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ require (
2626
github.com/ktrysmt/go-bitbucket v0.6.4
2727
github.com/lib/pq v1.10.9
2828
github.com/markbates/pkger v0.15.1
29-
github.com/mattn/go-sqlite3 v1.14.16
29+
github.com/mattn/go-sqlite3 v1.14.22
3030
github.com/microsoft/go-mssqldb v1.0.0
3131
github.com/mutecomm/go-sqlcipher/v4 v4.4.0
3232
github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peK
453453
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
454454
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
455455
github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
456-
github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
457-
github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
456+
github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
457+
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
458458
github.com/microsoft/go-mssqldb v1.0.0 h1:k2p2uuG8T5T/7Hp7/e3vMGTnnR0sU4h8d1CcC71iLHU=
459459
github.com/microsoft/go-mssqldb v1.0.0/go.mod h1:+4wZTUnz/SV6nffv+RRRB/ss8jPng5Sho2SmM1l2ts4=
460460
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs=

migrate.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,25 +89,25 @@ func New(sourceURL, databaseURL string) (*Migrate, error) {
8989

9090
sourceName, err := iurl.SchemeFromURL(sourceURL)
9191
if err != nil {
92-
return nil, err
92+
return nil, fmt.Errorf("failed to parse scheme from source URL: %w", err)
9393
}
9494
m.sourceName = sourceName
9595

9696
databaseName, err := iurl.SchemeFromURL(databaseURL)
9797
if err != nil {
98-
return nil, err
98+
return nil, fmt.Errorf("failed to parse scheme from database URL: %w", err)
9999
}
100100
m.databaseName = databaseName
101101

102102
sourceDrv, err := source.Open(sourceURL)
103103
if err != nil {
104-
return nil, err
104+
return nil, fmt.Errorf("failed to open source, %q: %w", sourceURL, err)
105105
}
106106
m.sourceDrv = sourceDrv
107107

108108
databaseDrv, err := database.Open(databaseURL)
109109
if err != nil {
110-
return nil, err
110+
return nil, fmt.Errorf("failed to open database, %q: %w", databaseURL, err)
111111
}
112112
m.databaseDrv = databaseDrv
113113

@@ -131,7 +131,7 @@ func NewWithDatabaseInstance(sourceURL string, databaseName string, databaseInst
131131

132132
sourceDrv, err := source.Open(sourceURL)
133133
if err != nil {
134-
return nil, err
134+
return nil, fmt.Errorf("failed to open source, %q: %w", sourceURL, err)
135135
}
136136
m.sourceDrv = sourceDrv
137137

@@ -149,15 +149,15 @@ func NewWithSourceInstance(sourceName string, sourceInstance source.Driver, data
149149

150150
databaseName, err := iurl.SchemeFromURL(databaseURL)
151151
if err != nil {
152-
return nil, err
152+
return nil, fmt.Errorf("failed to parse scheme from database URL: %w", err)
153153
}
154154
m.databaseName = databaseName
155155

156156
m.sourceName = sourceName
157157

158158
databaseDrv, err := database.Open(databaseURL)
159159
if err != nil {
160-
return nil, err
160+
return nil, fmt.Errorf("failed to open database, %q: %w", databaseURL, err)
161161
}
162162
m.databaseDrv = databaseDrv
163163

0 commit comments

Comments
 (0)