diff --git a/cmd/frostfs-adm/internal/modules/morph/generate/root.go b/cmd/frostfs-adm/internal/modules/morph/generate/root.go index 6b04848ae..3633d9a8e 100644 --- a/cmd/frostfs-adm/internal/modules/morph/generate/root.go +++ b/cmd/frostfs-adm/internal/modules/morph/generate/root.go @@ -32,7 +32,7 @@ var ( _ = viper.BindPFlag(commonflags.EndpointFlag, cmd.Flags().Lookup(commonflags.EndpointFlag)) _ = viper.BindPFlag(commonflags.RefillGasAmountFlag, cmd.Flags().Lookup(commonflags.RefillGasAmountFlag)) }, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { return refillGas(cmd, commonflags.RefillGasAmountFlag, false) }, } diff --git a/cmd/frostfs-adm/internal/modules/morph/policy/root.go b/cmd/frostfs-adm/internal/modules/morph/policy/root.go index db50279dc..a8a356207 100644 --- a/cmd/frostfs-adm/internal/modules/morph/policy/root.go +++ b/cmd/frostfs-adm/internal/modules/morph/policy/root.go @@ -16,7 +16,7 @@ var ( _ = viper.BindPFlag(commonflags.EndpointFlag, cmd.Flags().Lookup(commonflags.EndpointFlag)) }, RunE: SetPolicyCmd, - ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + ValidArgsFunction: func(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) { return []string{"ExecFeeFactor=", "StoragePrice=", "FeePerByte="}, cobra.ShellCompDirectiveNoSpace }, } diff --git a/cmd/frostfs-cli/internal/client/client.go b/cmd/frostfs-cli/internal/client/client.go index 9807e111c..f5ccabbe6 100644 --- a/cmd/frostfs-cli/internal/client/client.go +++ b/cmd/frostfs-cli/internal/client/client.go @@ -353,7 +353,7 @@ type PutObjectPrm struct { rdr io.Reader - headerCallback func(*objectSDK.Object) + headerCallback func() prepareLocally bool } @@ -370,7 +370,7 @@ func (x *PutObjectPrm) SetPayloadReader(rdr io.Reader) { // SetHeaderCallback sets callback which is called on the object after the header is received // but before the payload is written. -func (x *PutObjectPrm) SetHeaderCallback(f func(*objectSDK.Object)) { +func (x *PutObjectPrm) SetHeaderCallback(f func()) { x.headerCallback = f } @@ -439,7 +439,7 @@ func PutObject(ctx context.Context, prm PutObjectPrm) (*PutObjectRes, error) { if wrt.WriteHeader(ctx, *prm.hdr) { if prm.headerCallback != nil { - prm.headerCallback(prm.hdr) + prm.headerCallback() } sz := prm.hdr.PayloadSize() diff --git a/cmd/frostfs-cli/modules/accounting/balance.go b/cmd/frostfs-cli/modules/accounting/balance.go index d10b9eaa1..1364b5e8e 100644 --- a/cmd/frostfs-cli/modules/accounting/balance.go +++ b/cmd/frostfs-cli/modules/accounting/balance.go @@ -23,7 +23,7 @@ var accountingBalanceCmd = &cobra.Command{ Use: "balance", Short: "Get internal balance of FrostFS account", Long: `Get internal balance of FrostFS account`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(cmd *cobra.Command, _ []string) { var idUser user.ID pk := key.GetOrGenerate(cmd) diff --git a/cmd/frostfs-cli/modules/accounting/root.go b/cmd/frostfs-cli/modules/accounting/root.go index 8ab8aa125..afeca7626 100644 --- a/cmd/frostfs-cli/modules/accounting/root.go +++ b/cmd/frostfs-cli/modules/accounting/root.go @@ -11,7 +11,7 @@ var Cmd = &cobra.Command{ Use: "accounting", Short: "Operations with accounts and balances", Long: `Operations with accounts and balances`, - PersistentPreRun: func(cmd *cobra.Command, args []string) { + PersistentPreRun: func(cmd *cobra.Command, _ []string) { flags := cmd.Flags() _ = viper.BindPFlag(commonflags.WalletPath, flags.Lookup(commonflags.WalletPath)) diff --git a/cmd/frostfs-cli/modules/container/create.go b/cmd/frostfs-cli/modules/container/create.go index f670043ea..728332b35 100644 --- a/cmd/frostfs-cli/modules/container/create.go +++ b/cmd/frostfs-cli/modules/container/create.go @@ -38,7 +38,7 @@ var createContainerCmd = &cobra.Command{ Short: "Create new container", Long: `Create new container and register it in the FrostFS. It will be stored in sidechain when inner ring will accepts it.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(cmd *cobra.Command, _ []string) { placementPolicy, err := parseContainerPolicy(cmd, containerPolicy) commonCmd.ExitOnErr(cmd, "", err) diff --git a/cmd/frostfs-cli/modules/container/delete.go b/cmd/frostfs-cli/modules/container/delete.go index 20de84f74..e5425bf25 100644 --- a/cmd/frostfs-cli/modules/container/delete.go +++ b/cmd/frostfs-cli/modules/container/delete.go @@ -20,7 +20,7 @@ var deleteContainerCmd = &cobra.Command{ Short: "Delete existing container", Long: `Delete existing container. Only owner of the container has a permission to remove container.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(cmd *cobra.Command, _ []string) { id := parseContainerID(cmd) tok := getSession(cmd) diff --git a/cmd/frostfs-cli/modules/container/get.go b/cmd/frostfs-cli/modules/container/get.go index 1681dc7f3..8c4ab14f8 100644 --- a/cmd/frostfs-cli/modules/container/get.go +++ b/cmd/frostfs-cli/modules/container/get.go @@ -33,7 +33,7 @@ var getContainerInfoCmd = &cobra.Command{ Use: "get", Short: "Get container field info", Long: `Get container field info`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(cmd *cobra.Command, _ []string) { cnr, _ := getContainer(cmd) prettyPrintContainer(cmd, cnr, containerJSON) diff --git a/cmd/frostfs-cli/modules/container/get_eacl.go b/cmd/frostfs-cli/modules/container/get_eacl.go index 8896db769..4ed1c82e1 100644 --- a/cmd/frostfs-cli/modules/container/get_eacl.go +++ b/cmd/frostfs-cli/modules/container/get_eacl.go @@ -16,7 +16,7 @@ var getExtendedACLCmd = &cobra.Command{ Use: "get-eacl", Short: "Get extended ACL table of container", Long: `Get extended ACL table of container`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(cmd *cobra.Command, _ []string) { id := parseContainerID(cmd) pk := key.GetOrGenerate(cmd) cli := internalclient.GetSDKClientByFlag(cmd, pk, commonflags.RPC) diff --git a/cmd/frostfs-cli/modules/container/list.go b/cmd/frostfs-cli/modules/container/list.go index 86c1e5fba..8f5db49df 100644 --- a/cmd/frostfs-cli/modules/container/list.go +++ b/cmd/frostfs-cli/modules/container/list.go @@ -31,7 +31,7 @@ var listContainersCmd = &cobra.Command{ Use: "list", Short: "List all created containers", Long: "List all created containers", - Run: func(cmd *cobra.Command, args []string) { + Run: func(cmd *cobra.Command, _ []string) { var idUser user.ID key := key.GetOrGenerate(cmd) diff --git a/cmd/frostfs-cli/modules/container/list_objects.go b/cmd/frostfs-cli/modules/container/list_objects.go index 1e0aeb4db..ff2f8cf45 100644 --- a/cmd/frostfs-cli/modules/container/list_objects.go +++ b/cmd/frostfs-cli/modules/container/list_objects.go @@ -28,7 +28,7 @@ var listContainerObjectsCmd = &cobra.Command{ Use: "list-objects", Short: "List existing objects in container", Long: `List existing objects in container`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(cmd *cobra.Command, _ []string) { id := parseContainerID(cmd) filters := new(objectSDK.SearchFilters) diff --git a/cmd/frostfs-cli/modules/container/nodes.go b/cmd/frostfs-cli/modules/container/nodes.go index 9273dd651..d785fa23d 100644 --- a/cmd/frostfs-cli/modules/container/nodes.go +++ b/cmd/frostfs-cli/modules/container/nodes.go @@ -19,7 +19,7 @@ var containerNodesCmd = &cobra.Command{ Use: "nodes", Short: "Show nodes for container", Long: "Show nodes taking part in a container at the current epoch.", - Run: func(cmd *cobra.Command, args []string) { + Run: func(cmd *cobra.Command, _ []string) { cnr, pkey := getContainer(cmd) if pkey == nil { diff --git a/cmd/frostfs-cli/modules/container/root.go b/cmd/frostfs-cli/modules/container/root.go index ab7f5fb90..99d1a4231 100644 --- a/cmd/frostfs-cli/modules/container/root.go +++ b/cmd/frostfs-cli/modules/container/root.go @@ -10,7 +10,7 @@ var Cmd = &cobra.Command{ Use: "container", Short: "Operations with containers", Long: "Operations with containers", - PersistentPreRun: func(cmd *cobra.Command, args []string) { + PersistentPreRun: func(cmd *cobra.Command, _ []string) { // bind exactly that cmd's flags to // the viper before execution commonflags.Bind(cmd) diff --git a/cmd/frostfs-cli/modules/container/set_eacl.go b/cmd/frostfs-cli/modules/container/set_eacl.go index f2f60f5c3..86aa50a57 100644 --- a/cmd/frostfs-cli/modules/container/set_eacl.go +++ b/cmd/frostfs-cli/modules/container/set_eacl.go @@ -25,7 +25,7 @@ var setExtendedACLCmd = &cobra.Command{ Short: "Set new extended ACL table for container", Long: `Set new extended ACL table for container. Container ID in EACL table will be substituted with ID from the CLI.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(cmd *cobra.Command, _ []string) { id := parseContainerID(cmd) eaclTable := common.ReadEACL(cmd, flagVarsSetEACL.srcPath) diff --git a/cmd/frostfs-cli/modules/control/drop_objects.go b/cmd/frostfs-cli/modules/control/drop_objects.go index 9de3ae8a3..8c0bb2332 100644 --- a/cmd/frostfs-cli/modules/control/drop_objects.go +++ b/cmd/frostfs-cli/modules/control/drop_objects.go @@ -14,7 +14,7 @@ var dropObjectsCmd = &cobra.Command{ Use: "drop-objects", Short: "Drop objects from the node's local storage", Long: "Drop objects from the node's local storage", - Run: func(cmd *cobra.Command, args []string) { + Run: func(cmd *cobra.Command, _ []string) { pk := key.Get(cmd) dropObjectsList, _ := cmd.Flags().GetStringSlice(dropObjectsFlag) diff --git a/cmd/frostfs-cli/modules/control/root.go b/cmd/frostfs-cli/modules/control/root.go index 41222fc00..b20d3618e 100644 --- a/cmd/frostfs-cli/modules/control/root.go +++ b/cmd/frostfs-cli/modules/control/root.go @@ -10,7 +10,7 @@ var Cmd = &cobra.Command{ Use: "control", Short: "Operations with storage node", Long: `Operations with storage node`, - PersistentPreRun: func(cmd *cobra.Command, args []string) { + PersistentPreRun: func(cmd *cobra.Command, _ []string) { ff := cmd.Flags() _ = viper.BindPFlag(commonflags.WalletPath, ff.Lookup(commonflags.WalletPath)) diff --git a/cmd/frostfs-cli/modules/netmap/get_epoch.go b/cmd/frostfs-cli/modules/netmap/get_epoch.go index 1670f16c0..8e60e69bf 100644 --- a/cmd/frostfs-cli/modules/netmap/get_epoch.go +++ b/cmd/frostfs-cli/modules/netmap/get_epoch.go @@ -12,7 +12,7 @@ var getEpochCmd = &cobra.Command{ Use: "epoch", Short: "Get current epoch number", Long: "Get current epoch number", - Run: func(cmd *cobra.Command, args []string) { + Run: func(cmd *cobra.Command, _ []string) { p := key.GetOrGenerate(cmd) cli := internalclient.GetSDKClientByFlag(cmd, p, commonflags.RPC) diff --git a/cmd/frostfs-cli/modules/netmap/netinfo.go b/cmd/frostfs-cli/modules/netmap/netinfo.go index ceea6a890..cd43ba68d 100644 --- a/cmd/frostfs-cli/modules/netmap/netinfo.go +++ b/cmd/frostfs-cli/modules/netmap/netinfo.go @@ -16,7 +16,7 @@ var netInfoCmd = &cobra.Command{ Use: "netinfo", Short: "Get information about FrostFS network", Long: "Get information about FrostFS network", - Run: func(cmd *cobra.Command, args []string) { + Run: func(cmd *cobra.Command, _ []string) { p := key.GetOrGenerate(cmd) cli := internalclient.GetSDKClientByFlag(cmd, p, commonflags.RPC) diff --git a/cmd/frostfs-cli/modules/netmap/nodeinfo.go b/cmd/frostfs-cli/modules/netmap/nodeinfo.go index bf73286ed..b6ec48f35 100644 --- a/cmd/frostfs-cli/modules/netmap/nodeinfo.go +++ b/cmd/frostfs-cli/modules/netmap/nodeinfo.go @@ -18,7 +18,7 @@ var nodeInfoCmd = &cobra.Command{ Use: "nodeinfo", Short: "Get target node info", Long: `Get target node info`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(cmd *cobra.Command, _ []string) { p := key.GetOrGenerate(cmd) cli := internalclient.GetSDKClientByFlag(cmd, p, commonflags.RPC) diff --git a/cmd/frostfs-cli/modules/netmap/root.go b/cmd/frostfs-cli/modules/netmap/root.go index aaa83f12f..b4f5897e5 100644 --- a/cmd/frostfs-cli/modules/netmap/root.go +++ b/cmd/frostfs-cli/modules/netmap/root.go @@ -9,7 +9,7 @@ var Cmd = &cobra.Command{ Use: "netmap", Short: "Operations with Network Map", Long: `Operations with Network Map`, - PersistentPreRun: func(cmd *cobra.Command, args []string) { + PersistentPreRun: func(cmd *cobra.Command, _ []string) { // bind exactly that cmd's flags to // the viper before execution commonflags.Bind(cmd) diff --git a/cmd/frostfs-cli/modules/netmap/snapshot.go b/cmd/frostfs-cli/modules/netmap/snapshot.go index eaaf598b9..650d8a1b9 100644 --- a/cmd/frostfs-cli/modules/netmap/snapshot.go +++ b/cmd/frostfs-cli/modules/netmap/snapshot.go @@ -12,7 +12,7 @@ var snapshotCmd = &cobra.Command{ Use: "snapshot", Short: "Request current local snapshot of the network map", Long: `Request current local snapshot of the network map`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(cmd *cobra.Command, _ []string) { p := key.GetOrGenerate(cmd) cli := internalclient.GetSDKClientByFlag(cmd, p, commonflags.RPC) diff --git a/cmd/frostfs-cli/modules/object/put.go b/cmd/frostfs-cli/modules/object/put.go index a41d3c0aa..45e02edb3 100644 --- a/cmd/frostfs-cli/modules/object/put.go +++ b/cmd/frostfs-cli/modules/object/put.go @@ -174,7 +174,7 @@ func setFilePayloadReader(cmd *cobra.Command, f *os.File, prm *internalclient.Pu p := pb.New64(fi.Size()) p.Output = cmd.OutOrStdout() prm.SetPayloadReader(p.NewProxyReader(f)) - prm.SetHeaderCallback(func(o *objectSDK.Object) { p.Start() }) + prm.SetHeaderCallback(func() { p.Start() }) return p } @@ -182,7 +182,7 @@ func setBinaryPayloadReader(cmd *cobra.Command, obj *objectSDK.Object, prm *inte p := pb.New(len(obj.Payload())) p.Output = cmd.OutOrStdout() prm.SetPayloadReader(p.NewProxyReader(payloadReader)) - prm.SetHeaderCallback(func(o *objectSDK.Object) { p.Start() }) + prm.SetHeaderCallback(func() { p.Start() }) return p } diff --git a/cmd/frostfs-cli/modules/object/root.go b/cmd/frostfs-cli/modules/object/root.go index e04366f4d..7d8008b10 100644 --- a/cmd/frostfs-cli/modules/object/root.go +++ b/cmd/frostfs-cli/modules/object/root.go @@ -10,7 +10,7 @@ var Cmd = &cobra.Command{ Use: "object", Short: "Operations with Objects", Long: `Operations with Objects`, - PersistentPreRun: func(cmd *cobra.Command, args []string) { + PersistentPreRun: func(cmd *cobra.Command, _ []string) { // bind exactly that cmd's flags to // the viper before execution commonflags.Bind(cmd) diff --git a/cmd/frostfs-cli/modules/session/create.go b/cmd/frostfs-cli/modules/session/create.go index e92e4baa6..e13200a5d 100644 --- a/cmd/frostfs-cli/modules/session/create.go +++ b/cmd/frostfs-cli/modules/session/create.go @@ -29,7 +29,7 @@ var createCmd = &cobra.Command{ Use: "create", Short: "Create session token", Run: createSession, - PersistentPreRun: func(cmd *cobra.Command, args []string) { + PersistentPreRun: func(cmd *cobra.Command, _ []string) { _ = viper.BindPFlag(commonflags.WalletPath, cmd.Flags().Lookup(commonflags.WalletPath)) _ = viper.BindPFlag(commonflags.Account, cmd.Flags().Lookup(commonflags.Account)) }, diff --git a/cmd/frostfs-cli/modules/util/root.go b/cmd/frostfs-cli/modules/util/root.go index 3cdd236d4..4a6b4403b 100644 --- a/cmd/frostfs-cli/modules/util/root.go +++ b/cmd/frostfs-cli/modules/util/root.go @@ -9,7 +9,7 @@ import ( var Cmd = &cobra.Command{ Use: "util", Short: "Utility operations", - PersistentPreRun: func(cmd *cobra.Command, args []string) { + PersistentPreRun: func(cmd *cobra.Command, _ []string) { flags := cmd.Flags() _ = viper.BindPFlag(commonflags.GenerateKey, flags.Lookup(commonflags.GenerateKey)) diff --git a/cmd/frostfs-node/config.go b/cmd/frostfs-node/config.go index e5d3f7311..166d36b0c 100644 --- a/cmd/frostfs-node/config.go +++ b/cmd/frostfs-node/config.go @@ -925,7 +925,7 @@ func (c *cfg) getSubstorageOpts(shCfg shardCfg) []blobstor.SubStorage { ss = append(ss, blobstor.SubStorage{ Storage: fstree.New(fstreeOpts...), - Policy: func(_ *objectSDK.Object, data []byte) bool { + Policy: func(_ *objectSDK.Object, _ []byte) bool { return true }, }) diff --git a/cmd/frostfs-node/netmap.go b/cmd/frostfs-node/netmap.go index b21e842c5..b1d854da4 100644 --- a/cmd/frostfs-node/netmap.go +++ b/cmd/frostfs-node/netmap.go @@ -176,7 +176,7 @@ func addNewEpochNotificationHandlers(c *cfg) { c.cfgNetmap.state.setCurrentEpoch(ev.(netmapEvent.NewEpoch).EpochNumber()) }) - addNewEpochAsyncNotificationHandler(c, func(ev event.Event) { + addNewEpochAsyncNotificationHandler(c, func(_ event.Event) { if !c.needBootstrap() || c.cfgNetmap.reBoostrapTurnedOff.Load() { // fixes #470 return } @@ -203,7 +203,7 @@ func addNewEpochNotificationHandlers(c *cfg) { }) if c.cfgMorph.notaryEnabled { - addNewEpochAsyncNotificationHandler(c, func(ev event.Event) { + addNewEpochAsyncNotificationHandler(c, func(_ event.Event) { _, err := makeNotaryDeposit(c) if err != nil { c.log.Error(logs.FrostFSNodeCouldNotMakeNotaryDeposit, diff --git a/pkg/local_object_storage/blobovnicza/control.go b/pkg/local_object_storage/blobovnicza/control.go index dfc4f884f..dab301647 100644 --- a/pkg/local_object_storage/blobovnicza/control.go +++ b/pkg/local_object_storage/blobovnicza/control.go @@ -115,7 +115,7 @@ func (b *Blobovnicza) initializeCounters() error { return nil } - return b.iterateAllDataBuckets(tx, func(lower, upper uint64, b *bbolt.Bucket) (bool, error) { + return b.iterateAllDataBuckets(tx, func(_, _ uint64, b *bbolt.Bucket) (bool, error) { return false, b.ForEach(func(k, v []byte) error { size += uint64(len(k) + len(v)) items++ diff --git a/pkg/local_object_storage/metabase/control.go b/pkg/local_object_storage/metabase/control.go index ec4c29c4b..a275f4560 100644 --- a/pkg/local_object_storage/metabase/control.go +++ b/pkg/local_object_storage/metabase/control.go @@ -167,7 +167,7 @@ func (db *DB) init(reset bool) error { return nil } - err = tx.ForEach(func(name []byte, b *bbolt.Bucket) error { + err = tx.ForEach(func(name []byte, _ *bbolt.Bucket) error { if _, ok := mStaticBuckets[string(name)]; !ok { return tx.DeleteBucket(name) } diff --git a/pkg/local_object_storage/metabase/inhume.go b/pkg/local_object_storage/metabase/inhume.go index cd83a6159..250504120 100644 --- a/pkg/local_object_storage/metabase/inhume.go +++ b/pkg/local_object_storage/metabase/inhume.go @@ -354,7 +354,7 @@ func isTomb(graveyardBucket *bbolt.Bucket, key []byte) (bool, error) { // iterate over graveyard and check if target address // is the address of tombstone in graveyard. - err := graveyardBucket.ForEach(func(k, v []byte) error { + err := graveyardBucket.ForEach(func(_, v []byte) error { // check if graveyard has record with key corresponding // to tombstone address (at least one) targetIsTomb = bytes.Equal(v, key) diff --git a/pkg/local_object_storage/metabase/select.go b/pkg/local_object_storage/metabase/select.go index 8b086a89f..e5321c794 100644 --- a/pkg/local_object_storage/metabase/select.go +++ b/pkg/local_object_storage/metabase/select.go @@ -174,7 +174,7 @@ func selectAllFromBucket(tx *bbolt.Tx, name []byte, to map[string]int, fNum int) return } - _ = bkt.ForEach(func(k, v []byte) error { + _ = bkt.ForEach(func(k, _ []byte) error { markAddressInCache(to, fNum, string(k)) return nil @@ -386,7 +386,7 @@ func (db *DB) selectFromList( return } - if err = fMatch.matchBucket(bkt, f.Header(), f.Value(), func(key, val []byte) error { + if err = fMatch.matchBucket(bkt, f.Header(), f.Value(), func(_, val []byte) error { l, err := decodeList(val) if err != nil { db.log.Debug(logs.MetabaseCantDecodeListBucketLeaf, @@ -459,7 +459,7 @@ func (db *DB) selectObjectID( return } - err := fMatch.matchBucket(bkt, f.Header(), f.Value(), func(k, v []byte) error { + err := fMatch.matchBucket(bkt, f.Header(), f.Value(), func(k, _ []byte) error { var id oid.ID if err := id.Decode(k); err == nil { appendOID(id) diff --git a/pkg/local_object_storage/shard/shard.go b/pkg/local_object_storage/shard/shard.go index e8f1978d2..8368f6db4 100644 --- a/pkg/local_object_storage/shard/shard.go +++ b/pkg/local_object_storage/shard/shard.go @@ -375,7 +375,7 @@ func WithRebuildWorkerLimiter(l RebuildWorkerLimiter) Option { // For testing purposes only. func WithDisabledGC() Option { return func(c *cfg) { - c.gcCfg.testHookRemover = func(ctx context.Context) gcRunResult { return gcRunResult{} } + c.gcCfg.testHookRemover = func(_ context.Context) gcRunResult { return gcRunResult{} } } } diff --git a/pkg/local_object_storage/writecache/iterate.go b/pkg/local_object_storage/writecache/iterate.go index 5349c069c..9ec039f91 100644 --- a/pkg/local_object_storage/writecache/iterate.go +++ b/pkg/local_object_storage/writecache/iterate.go @@ -27,7 +27,7 @@ func IterateDB(db *bbolt.DB, f func(oid.Address) error) error { var addr oid.Address - return b.ForEach(func(k, v []byte) error { + return b.ForEach(func(k, _ []byte) error { err := addr.DecodeString(string(k)) if err != nil { return fmt.Errorf("could not parse object address: %w", err) diff --git a/pkg/services/notificator/nats/service.go b/pkg/services/notificator/nats/service.go index 7f525df95..9de538f2b 100644 --- a/pkg/services/notificator/nats/service.go +++ b/pkg/services/notificator/nats/service.go @@ -93,10 +93,10 @@ func New(oo ...Option) *Writer { w.opts.nOpts = append(w.opts.nOpts, nats.NoCallbacksAfterClientClose(), // do not call callbacks when it was planned writer stop - nats.DisconnectErrHandler(func(conn *nats.Conn, err error) { + nats.DisconnectErrHandler(func(_ *nats.Conn, err error) { w.log.Error(logs.NatsNatsConnectionWasLost, zap.Error(err)) }), - nats.ReconnectHandler(func(conn *nats.Conn) { + nats.ReconnectHandler(func(_ *nats.Conn) { w.log.Warn(logs.NatsNatsReconnectedToTheServer) }), )