From f45b7a048de3c5e3abb12d63647f3c1beb264e1e Mon Sep 17 00:00:00 2001
From: Alex Vanin <alexey@nspcc.ru>
Date: Tue, 1 Dec 2020 12:50:16 +0300
Subject: [PATCH] [#222] Rename `WithTreeRoot..` to `WithRoot..` in blobstor
 opts

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
---
 cmd/neofs-node/config.go                              | 6 +++---
 pkg/local_object_storage/blobstor/blobovnicza_test.go | 2 +-
 pkg/local_object_storage/blobstor/blobstor.go         | 8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/cmd/neofs-node/config.go b/cmd/neofs-node/config.go
index 3e276da18..987dfe359 100644
--- a/cmd/neofs-node/config.go
+++ b/cmd/neofs-node/config.go
@@ -510,9 +510,9 @@ func initShardOptions(c *cfg) {
 		opts = append(opts, []shard.Option{
 			shard.WithLogger(c.log),
 			shard.WithBlobStorOptions(
-				blobstor.WithTreeRootPath(blobPath),
+				blobstor.WithRootPath(blobPath),
 				blobstor.WithCompressObjects(compressObjects, c.log),
-				blobstor.WithTreeRootPerm(blobPerm),
+				blobstor.WithRootPerm(blobPerm),
 				blobstor.WithShallowDepth(shallowDepth),
 				blobstor.WithSmallSizeLimit(smallSzLimit),
 				blobstor.WithBlobovniczaSize(blzSize),
@@ -528,7 +528,7 @@ func initShardOptions(c *cfg) {
 			),
 			shard.WithWriteCache(useCache),
 			shard.WithWriteCacheOptions(
-				blobstor.WithTreeRootPath(writeCachePath),
+				blobstor.WithRootPath(writeCachePath),
 			),
 		})
 
diff --git a/pkg/local_object_storage/blobstor/blobovnicza_test.go b/pkg/local_object_storage/blobstor/blobovnicza_test.go
index 70074a871..d1cf3aaa6 100644
--- a/pkg/local_object_storage/blobstor/blobovnicza_test.go
+++ b/pkg/local_object_storage/blobstor/blobovnicza_test.go
@@ -67,7 +67,7 @@ func TestBlobovniczas(t *testing.T) {
 		WithSmallSizeLimit(szLim),
 		WithBlobovniczaShallowWidth(width),
 		WithBlobovniczaShallowDepth(depth),
-		WithTreeRootPath(p),
+		WithRootPath(p),
 		WithBlobovniczaSize(szLim),
 	} {
 		opt(c)
diff --git a/pkg/local_object_storage/blobstor/blobstor.go b/pkg/local_object_storage/blobstor/blobstor.go
index 0ebcbce29..b08c3f08f 100644
--- a/pkg/local_object_storage/blobstor/blobstor.go
+++ b/pkg/local_object_storage/blobstor/blobstor.go
@@ -131,18 +131,18 @@ func WithCompressObjects(comp bool, log *logger.Logger) Option {
 	}
 }
 
-// WithTreeRootPath returns option to set path to root directory
+// WithRootPath returns option to set path to root directory
 // of the fs tree to write the objects.
-func WithTreeRootPath(rootDir string) Option {
+func WithRootPath(rootDir string) Option {
 	return func(c *cfg) {
 		c.fsTree.RootPath = rootDir
 		c.blzRootPath = path.Join(rootDir, blobovniczaDir)
 	}
 }
 
-// WithTreeRootPerm returns option to set permission
+// WithRootPerm returns option to set permission
 // bits of the fs tree.
-func WithTreeRootPerm(perm os.FileMode) Option {
+func WithRootPerm(perm os.FileMode) Option {
 	return func(c *cfg) {
 		c.fsTree.Permissions = perm
 		c.blzOpts = append(c.blzOpts, blobovnicza.WithPermissions(perm))