From cf9a2d1e546305fb2d8dfbac8d9a03c7da6952a3 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 4 Jun 2021 13:34:57 +0300 Subject: [PATCH] pool: don't use deprecated token.SessionToken pkg/pool/pool.go:86:32 staticcheck SA1019: token.SessionToken is deprecated: use session.Token instead pkg/pool/pool.go:92:16 staticcheck SA1019: token.SessionToken is deprecated: use session.Token instead pkg/pool/pool.go:151:46 staticcheck SA1019: token.SessionToken is deprecated: use session.Token instead Signed-off-by: Roman Khimov --- pkg/pool/pool.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/pool/pool.go b/pkg/pool/pool.go index 3aacc46..9282031 100644 --- a/pkg/pool/pool.go +++ b/pkg/pool/pool.go @@ -11,7 +11,7 @@ import ( "github.com/nspcc-dev/neofs-api-go/pkg/client" "github.com/nspcc-dev/neofs-api-go/pkg/owner" - "github.com/nspcc-dev/neofs-api-go/pkg/token" + "github.com/nspcc-dev/neofs-api-go/pkg/session" "google.golang.org/grpc" "google.golang.org/grpc/keepalive" ) @@ -83,13 +83,13 @@ func (pb *Builder) Build(ctx context.Context, options *BuilderOptions) (Pool, er // Pool is an interface providing connection artifacts on request. type Pool interface { - Connection() (client.Client, *token.SessionToken, error) + Connection() (client.Client, *session.Token, error) OwnerID() *owner.ID } type clientPack struct { client client.Client - sessionToken *token.SessionToken + sessionToken *session.Token healthy bool } @@ -148,7 +148,7 @@ func newPool(ctx context.Context, options *BuilderOptions) (Pool, error) { return pool, nil } -func (p *pool) Connection() (client.Client, *token.SessionToken, error) { +func (p *pool) Connection() (client.Client, *session.Token, error) { p.lock.RLock() defer p.lock.RUnlock() if len(p.clientPacks) == 1 {