From 63c00e785db89f915cafb64064865a25b046f470 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Mon, 6 Jun 2022 17:01:21 +0300 Subject: [PATCH] [#1461] shard: Fix option naming `WitDeletedLockCallback` => `WithDeletedLockCallback`. Signed-off-by: Pavel Karpy --- pkg/local_object_storage/engine/shards.go | 2 +- pkg/local_object_storage/shard/lock_test.go | 2 +- pkg/local_object_storage/shard/shard.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/local_object_storage/engine/shards.go b/pkg/local_object_storage/engine/shards.go index beea5826..e0cc8d77 100644 --- a/pkg/local_object_storage/engine/shards.go +++ b/pkg/local_object_storage/engine/shards.go @@ -38,7 +38,7 @@ func (e *StorageEngine) AddShard(opts ...shard.Option) (*shard.ID, error) { shard.WithID(id), shard.WithExpiredTombstonesCallback(e.processExpiredTombstones), shard.WithExpiredLocksCallback(e.processExpiredLocks), - shard.WitDeletedLockCallback(e.processDeletedLocks), + shard.WithDeletedLockCallback(e.processDeletedLocks), )...) if err := sh.UpdateID(); err != nil { diff --git a/pkg/local_object_storage/shard/lock_test.go b/pkg/local_object_storage/shard/lock_test.go index 2ac3c6ba..81558dbf 100644 --- a/pkg/local_object_storage/shard/lock_test.go +++ b/pkg/local_object_storage/shard/lock_test.go @@ -33,7 +33,7 @@ func TestShard_Lock(t *testing.T) { shard.WithMetaBaseOptions( meta.WithPath(filepath.Join(rootPath, "meta")), ), - shard.WitDeletedLockCallback(func(_ context.Context, addresses []oid.Address) { + shard.WithDeletedLockCallback(func(_ context.Context, addresses []oid.Address) { sh.HandleDeletedLocks(addresses) }), } diff --git a/pkg/local_object_storage/shard/shard.go b/pkg/local_object_storage/shard/shard.go index 47a82500..16aca5f1 100644 --- a/pkg/local_object_storage/shard/shard.go +++ b/pkg/local_object_storage/shard/shard.go @@ -234,9 +234,9 @@ func WithTombstoneSource(v TombstoneSource) Option { } } -// WitDeletedLockCallback returns option to specify callback +// WithDeletedLockCallback returns option to specify callback // of the deleted LOCK objects handler. -func WitDeletedLockCallback(v DeletedLockCallback) Option { +func WithDeletedLockCallback(v DeletedLockCallback) Option { return func(c *cfg) { c.deletedLockCallBack = v }