diff --git a/core/anytype/config/config.go b/core/anytype/config/config.go index 8aaad8d32..c3c09b695 100644 --- a/core/anytype/config/config.go +++ b/core/anytype/config/config.go @@ -7,6 +7,7 @@ import ( "strings" "github.com/anyproto/any-sync/app" + //nolint:misspell "github.com/anyproto/any-sync/commonspace/config" "github.com/anyproto/any-sync/metric" "github.com/anyproto/any-sync/net/rpc" diff --git a/space/clientserver/clientserver.go b/space/clientserver/clientserver.go index c5e6dab60..bb77ce82c 100644 --- a/space/clientserver/clientserver.go +++ b/space/clientserver/clientserver.go @@ -51,7 +51,7 @@ func (s *clientServer) Name() (name string) { } func (s *clientServer) Run(ctx context.Context) error { - if err := s.startServer(ctx); err != nil { + if err := s.startServer(); err != nil { log.InfoCtx(ctx, "failed to start drpc server", zap.Error(err)) } else { s.serverStarted = true @@ -63,7 +63,7 @@ func (s *clientServer) Port() int { return s.port } -func (s *clientServer) startServer(ctx context.Context) (err error) { +func (s *clientServer) startServer() (err error) { db, err := s.provider.SpaceStorage() if err != nil { return @@ -109,6 +109,6 @@ func (s *clientServer) prepareListener(port int) (net.Listener, error) { return net.Listen("tcp", ":") } -func (s *clientServer) Close(ctx context.Context) (err error) { +func (s *clientServer) Close(_ context.Context) (err error) { return nil } diff --git a/space/peermanager/manager.go b/space/peermanager/manager.go index faab5ff25..75d8d1476 100644 --- a/space/peermanager/manager.go +++ b/space/peermanager/manager.go @@ -25,7 +25,7 @@ type clientPeerManager struct { sync.Mutex } -func (n *clientPeerManager) Init(a *app.App) (err error) { +func (n *clientPeerManager) Init(_ *app.App) (err error) { n.responsiblePeerIds = n.peerStore.ResponsibleNodeIds(n.spaceId) return } diff --git a/space/service.go b/space/service.go index abe2af417..05b7efdc9 100644 --- a/space/service.go +++ b/space/service.go @@ -3,14 +3,12 @@ package space import ( "context" "errors" - "storj.io/drpc" "time" "github.com/anyproto/any-sync/app" "github.com/anyproto/any-sync/app/logger" "github.com/anyproto/any-sync/app/ocache" "github.com/anyproto/any-sync/commonspace" - "github.com/anyproto/any-sync/net/peerservice" // nolint: misspell commonconfig "github.com/anyproto/any-sync/commonspace/config" "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" @@ -20,11 +18,13 @@ import ( "github.com/anyproto/any-sync/commonspace/syncstatus" "github.com/anyproto/any-sync/coordinator/coordinatorclient" "github.com/anyproto/any-sync/coordinator/coordinatorproto" + "github.com/anyproto/any-sync/net/peerservice" "github.com/anyproto/any-sync/net/pool" "github.com/anyproto/any-sync/net/rpc/server" "github.com/anyproto/any-sync/net/streampool" "github.com/gogo/protobuf/proto" "go.uber.org/zap" + "storj.io/drpc" "github.com/anyproto/anytype-heart/core/anytype/config" "github.com/anyproto/anytype-heart/core/wallet" diff --git a/space/streamhandler.go b/space/streamhandler.go index 74e4935e3..f65a5dabe 100644 --- a/space/streamhandler.go +++ b/space/streamhandler.go @@ -2,10 +2,10 @@ package space import ( "errors" - "github.com/anyproto/any-sync/commonspace/objectsync" "sync/atomic" "time" + "github.com/anyproto/any-sync/commonspace/objectsync" "github.com/anyproto/any-sync/commonspace/spacesyncproto" "github.com/anyproto/any-sync/net/peer" "golang.org/x/net/context" diff --git a/space/syncstatusprovider/syncstatusprovider.go b/space/syncstatusprovider/syncstatusprovider.go index a2a88e0ba..1c9794745 100644 --- a/space/syncstatusprovider/syncstatusprovider.go +++ b/space/syncstatusprovider/syncstatusprovider.go @@ -13,7 +13,7 @@ func New() syncstatus.StatusServiceProvider { type statusProvider struct { } -func (s statusProvider) Init(a *app.App) (err error) { +func (s statusProvider) Init(_ *app.App) (err error) { return nil }