dialect/sql: fix error formatting (#4244)

* dialect/sql: fix error formating

* use errors.join
This commit is contained in:
Ronen Lubin
2024-10-21 14:56:53 +03:00
committed by GitHub
parent d1dab301c6
commit 89ad7fa39d

View File

@@ -202,7 +202,7 @@ func (a *Atlas) NamedDiff(ctx context.Context, name string, tables ...*Table) er
func (a *Atlas) cleanSchema(ctx context.Context, name string, err0 error) (err error) {
defer func() {
if err0 != nil {
err = fmt.Errorf("%v: %w", err0, err)
err = errors.Join(err, err0)
}
}()
s, err := a.atDriver.InspectSchema(ctx, name, nil)