@@ -12,7 +12,6 @@ import (
1212 "github.com/golang-migrate/migrate/v4"
1313 "github.com/golang-migrate/migrate/v4/database"
1414 "github.com/hashicorp/go-multierror"
15- "github.com/pkg/errors"
1615 "github.com/rqlite/gorqlite"
1716)
1817
@@ -292,7 +291,7 @@ func parseUrl(url string) (*nurl.URL, *Config, error) {
292291 }
293292
294293 if parsedUrl .Scheme != "rqlite" {
295- return nil , nil , errors . Wrap ( ErrBadConfig , "bad scheme" )
294+ return nil , nil , fmt . Errorf ( "bad scheme: %w" , ErrBadConfig )
296295 }
297296
298297 // adapt from rqlite to http/https schemes
@@ -316,7 +315,7 @@ func parseConfigFromQuery(queryVals nurl.Values) (*Config, error) {
316315 migrationsTable := queryVals .Get ("x-migrations-table" )
317316 if migrationsTable != "" {
318317 if strings .HasPrefix (migrationsTable , "sqlite_" ) {
319- return nil , errors . Wrap ( ErrBadConfig , "invalid value for x-migrations-table" )
318+ return nil , fmt . Errorf ( "invalid value for x-migrations-table: %w" , ErrBadConfig )
320319 }
321320 c .MigrationsTable = migrationsTable
322321 }
@@ -325,7 +324,7 @@ func parseConfigFromQuery(queryVals nurl.Values) (*Config, error) {
325324 if connectInsecureStr != "" {
326325 connectInsecure , err := strconv .ParseBool (connectInsecureStr )
327326 if err != nil {
328- return nil , errors . Wrap ( ErrBadConfig , "invalid value for x-connect-insecure" )
327+ return nil , fmt . Errorf ( "invalid value for x-connect-insecure: %w" , ErrBadConfig )
329328 }
330329 c .ConnectInsecure = connectInsecure
331330 }
0 commit comments