From 628ae20c722a01b3910a46d7115ee3d56f6d3263 Mon Sep 17 00:00:00 2001 From: Angira Kekteeva Date: Wed, 28 Jul 2021 13:43:51 +0300 Subject: [PATCH 1/2] [#26] *: Move pkg content to root Signed-off-by: Angira Kekteeva --- {pkg/logger => logger}/grpc.go | 0 {pkg/logger => logger}/option.go | 0 {pkg/logger => logger}/zap.go | 0 {pkg/policy => policy}/doc.go | 0 {pkg/policy => policy}/encode.go | 0 {pkg/policy => policy}/encode_test.go | 0 {pkg/policy => policy}/json.go | 0 {pkg/policy => policy}/json_test.go | 0 {pkg/policy => policy}/parser/Query.g4 | 0 {pkg/policy => policy}/parser/Query.interp | Bin {pkg/policy => policy}/parser/Query.tokens | Bin {pkg/policy => policy}/parser/QueryLexer.g4 | 0 {pkg/policy => policy}/parser/QueryLexer.interp | Bin {pkg/policy => policy}/parser/QueryLexer.tokens | Bin {pkg/policy => policy}/parser/generate.go | 0 .../policy => policy}/parser/query_base_listener.go | Bin {pkg/policy => policy}/parser/query_base_visitor.go | Bin {pkg/policy => policy}/parser/query_lexer.go | Bin {pkg/policy => policy}/parser/query_listener.go | Bin {pkg/policy => policy}/parser/query_parser.go | Bin {pkg/policy => policy}/parser/query_visitor.go | Bin {pkg/policy => policy}/query.go | 0 {pkg/policy => policy}/query_test.go | 0 {pkg/pool => pool}/key.go | 0 {pkg/pool => pool}/mock_test.go | 0 {pkg/pool => pool}/pool.go | 1 + {pkg/pool => pool}/pool_test.go | 0 {pkg/pool => pool}/sampler.go | 0 {pkg/pool => pool}/sampler_test.go | 0 29 files changed, 1 insertion(+) rename {pkg/logger => logger}/grpc.go (100%) rename {pkg/logger => logger}/option.go (100%) rename {pkg/logger => logger}/zap.go (100%) rename {pkg/policy => policy}/doc.go (100%) rename {pkg/policy => policy}/encode.go (100%) rename {pkg/policy => policy}/encode_test.go (100%) rename {pkg/policy => policy}/json.go (100%) rename {pkg/policy => policy}/json_test.go (100%) rename {pkg/policy => policy}/parser/Query.g4 (100%) rename {pkg/policy => policy}/parser/Query.interp (100%) rename {pkg/policy => policy}/parser/Query.tokens (100%) rename {pkg/policy => policy}/parser/QueryLexer.g4 (100%) rename {pkg/policy => policy}/parser/QueryLexer.interp (100%) rename {pkg/policy => policy}/parser/QueryLexer.tokens (100%) rename {pkg/policy => policy}/parser/generate.go (100%) rename {pkg/policy => policy}/parser/query_base_listener.go (100%) rename {pkg/policy => policy}/parser/query_base_visitor.go (100%) rename {pkg/policy => policy}/parser/query_lexer.go (100%) rename {pkg/policy => policy}/parser/query_listener.go (100%) rename {pkg/policy => policy}/parser/query_parser.go (100%) rename {pkg/policy => policy}/parser/query_visitor.go (100%) rename {pkg/policy => policy}/query.go (100%) rename {pkg/policy => policy}/query_test.go (100%) rename {pkg/pool => pool}/key.go (100%) rename {pkg/pool => pool}/mock_test.go (100%) rename {pkg/pool => pool}/pool.go (99%) rename {pkg/pool => pool}/pool_test.go (100%) rename {pkg/pool => pool}/sampler.go (100%) rename {pkg/pool => pool}/sampler_test.go (100%) diff --git a/pkg/logger/grpc.go b/logger/grpc.go similarity index 100% rename from pkg/logger/grpc.go rename to logger/grpc.go diff --git a/pkg/logger/option.go b/logger/option.go similarity index 100% rename from pkg/logger/option.go rename to logger/option.go diff --git a/pkg/logger/zap.go b/logger/zap.go similarity index 100% rename from pkg/logger/zap.go rename to logger/zap.go diff --git a/pkg/policy/doc.go b/policy/doc.go similarity index 100% rename from pkg/policy/doc.go rename to policy/doc.go diff --git a/pkg/policy/encode.go b/policy/encode.go similarity index 100% rename from pkg/policy/encode.go rename to policy/encode.go diff --git a/pkg/policy/encode_test.go b/policy/encode_test.go similarity index 100% rename from pkg/policy/encode_test.go rename to policy/encode_test.go diff --git a/pkg/policy/json.go b/policy/json.go similarity index 100% rename from pkg/policy/json.go rename to policy/json.go diff --git a/pkg/policy/json_test.go b/policy/json_test.go similarity index 100% rename from pkg/policy/json_test.go rename to policy/json_test.go diff --git a/pkg/policy/parser/Query.g4 b/policy/parser/Query.g4 similarity index 100% rename from pkg/policy/parser/Query.g4 rename to policy/parser/Query.g4 diff --git a/pkg/policy/parser/Query.interp b/policy/parser/Query.interp similarity index 100% rename from pkg/policy/parser/Query.interp rename to policy/parser/Query.interp diff --git a/pkg/policy/parser/Query.tokens b/policy/parser/Query.tokens similarity index 100% rename from pkg/policy/parser/Query.tokens rename to policy/parser/Query.tokens diff --git a/pkg/policy/parser/QueryLexer.g4 b/policy/parser/QueryLexer.g4 similarity index 100% rename from pkg/policy/parser/QueryLexer.g4 rename to policy/parser/QueryLexer.g4 diff --git a/pkg/policy/parser/QueryLexer.interp b/policy/parser/QueryLexer.interp similarity index 100% rename from pkg/policy/parser/QueryLexer.interp rename to policy/parser/QueryLexer.interp diff --git a/pkg/policy/parser/QueryLexer.tokens b/policy/parser/QueryLexer.tokens similarity index 100% rename from pkg/policy/parser/QueryLexer.tokens rename to policy/parser/QueryLexer.tokens diff --git a/pkg/policy/parser/generate.go b/policy/parser/generate.go similarity index 100% rename from pkg/policy/parser/generate.go rename to policy/parser/generate.go diff --git a/pkg/policy/parser/query_base_listener.go b/policy/parser/query_base_listener.go similarity index 100% rename from pkg/policy/parser/query_base_listener.go rename to policy/parser/query_base_listener.go diff --git a/pkg/policy/parser/query_base_visitor.go b/policy/parser/query_base_visitor.go similarity index 100% rename from pkg/policy/parser/query_base_visitor.go rename to policy/parser/query_base_visitor.go diff --git a/pkg/policy/parser/query_lexer.go b/policy/parser/query_lexer.go similarity index 100% rename from pkg/policy/parser/query_lexer.go rename to policy/parser/query_lexer.go diff --git a/pkg/policy/parser/query_listener.go b/policy/parser/query_listener.go similarity index 100% rename from pkg/policy/parser/query_listener.go rename to policy/parser/query_listener.go diff --git a/pkg/policy/parser/query_parser.go b/policy/parser/query_parser.go similarity index 100% rename from pkg/policy/parser/query_parser.go rename to policy/parser/query_parser.go diff --git a/pkg/policy/parser/query_visitor.go b/policy/parser/query_visitor.go similarity index 100% rename from pkg/policy/parser/query_visitor.go rename to policy/parser/query_visitor.go diff --git a/pkg/policy/query.go b/policy/query.go similarity index 100% rename from pkg/policy/query.go rename to policy/query.go diff --git a/pkg/policy/query_test.go b/policy/query_test.go similarity index 100% rename from pkg/policy/query_test.go rename to policy/query_test.go diff --git a/pkg/pool/key.go b/pool/key.go similarity index 100% rename from pkg/pool/key.go rename to pool/key.go diff --git a/pkg/pool/mock_test.go b/pool/mock_test.go similarity index 100% rename from pkg/pool/mock_test.go rename to pool/mock_test.go diff --git a/pkg/pool/pool.go b/pool/pool.go similarity index 99% rename from pkg/pool/pool.go rename to pool/pool.go index 5518c6f1..055ffaae 100644 --- a/pkg/pool/pool.go +++ b/pool/pool.go @@ -169,6 +169,7 @@ func updateNodesHealth(ctx context.Context, p *pool, options *BuilderOptions, bu wg := sync.WaitGroup{} for i, cPack := range p.clientPacks { wg.Add(1) + go func(i int, client client.Client) { defer wg.Done() var ( diff --git a/pkg/pool/pool_test.go b/pool/pool_test.go similarity index 100% rename from pkg/pool/pool_test.go rename to pool/pool_test.go diff --git a/pkg/pool/sampler.go b/pool/sampler.go similarity index 100% rename from pkg/pool/sampler.go rename to pool/sampler.go diff --git a/pkg/pool/sampler_test.go b/pool/sampler_test.go similarity index 100% rename from pkg/pool/sampler_test.go rename to pool/sampler_test.go From c0101c65618d0709563c27ede1302fa8d158a54e Mon Sep 17 00:00:00 2001 From: Angira Kekteeva Date: Wed, 28 Jul 2021 13:47:20 +0300 Subject: [PATCH 2/2] [#26] policy: Update imports Signed-off-by: Angira Kekteeva --- policy/encode_test.go | 2 +- policy/query.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/policy/encode_test.go b/policy/encode_test.go index d2bb716f..813e7168 100644 --- a/policy/encode_test.go +++ b/policy/encode_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/nspcc-dev/neofs-sdk-go/pkg/policy" + "github.com/nspcc-dev/neofs-sdk-go/policy" "github.com/stretchr/testify/require" ) diff --git a/policy/query.go b/policy/query.go index 9bf08ac2..9688d13f 100644 --- a/policy/query.go +++ b/policy/query.go @@ -8,7 +8,7 @@ import ( "github.com/antlr/antlr4/runtime/Go/antlr" "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-sdk-go/pkg/policy/parser" + "github.com/nspcc-dev/neofs-sdk-go/policy/parser" ) var (