chore: fix deprecated const

This commit is contained in:
CrazyMax
2025-06-13 02:01:57 +02:00
parent 05b2e220bc
commit f54f27cc6e

View File

@@ -7,7 +7,7 @@ import (
"github.com/opencontainers/go-digest" "github.com/opencontainers/go-digest"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"go.etcd.io/bbolt" bbolterr "go.etcd.io/bbolt/errors"
) )
// Migrate runs database migration // Migrate runs database migration
@@ -56,7 +56,7 @@ func (c *Client) migration2() error {
return err return err
} }
defer func() { defer func() {
if err := tx.Rollback(); err != nil && err != bbolt.ErrTxClosed { if err := tx.Rollback(); err != nil && !errors.Is(err, bbolterr.ErrTxClosed) {
log.Error().Err(err).Msg("Cannot rollback") log.Error().Err(err).Msg("Cannot rollback")
} }
}() }()