diff --git a/.forgejo/workflows/pre-commit.yml b/.forgejo/workflows/pre-commit.yml index 6453b5029..117cda93b 100644 --- a/.forgejo/workflows/pre-commit.yml +++ b/.forgejo/workflows/pre-commit.yml @@ -9,7 +9,7 @@ jobs: SKIP: make-lint,go-staticcheck-repo-mod,go-unit-tests,gofumpt runs-on: ubuntu-22.04 # If we use actions/setup-python from either Github or Gitea, - # the line above fails with a cryptic error about not being able to found python. + # the line above fails with a cryptic error about not being able to find python. # So install everything manually. steps: - uses: actions/checkout@v3 diff --git a/cmd/frostfs-adm/internal/modules/morph/frostfsid/frostfsid.go b/cmd/frostfs-adm/internal/modules/morph/frostfsid/frostfsid.go index 541282967..6b274ddfb 100644 --- a/cmd/frostfs-adm/internal/modules/morph/frostfsid/frostfsid.go +++ b/cmd/frostfs-adm/internal/modules/morph/frostfsid/frostfsid.go @@ -426,7 +426,7 @@ type frostfsidClient struct { func newFrostfsIDClient(cmd *cobra.Command) (*frostfsidClient, error) { wCtx, err := helper.NewInitializeContext(cmd, viper.GetViper()) if err != nil { - return nil, fmt.Errorf("can't to initialize context: %w", err) + return nil, fmt.Errorf("can't initialize context: %w", err) } r := management.NewReader(wCtx.ReadOnlyInvoker) diff --git a/cmd/frostfs-adm/internal/modules/morph/netmap/epoch.go b/cmd/frostfs-adm/internal/modules/morph/netmap/epoch.go index 4fd671f2a..e60dc5673 100644 --- a/cmd/frostfs-adm/internal/modules/morph/netmap/epoch.go +++ b/cmd/frostfs-adm/internal/modules/morph/netmap/epoch.go @@ -15,7 +15,7 @@ import ( func ForceNewEpochCmd(cmd *cobra.Command, _ []string) error { wCtx, err := helper.NewInitializeContext(cmd, viper.GetViper()) if err != nil { - return fmt.Errorf("can't to initialize context: %w", err) + return fmt.Errorf("can't initialize context: %w", err) } r := management.NewReader(wCtx.ReadOnlyInvoker) diff --git a/cmd/frostfs-adm/internal/modules/morph/policy/policy.go b/cmd/frostfs-adm/internal/modules/morph/policy/policy.go index 5ab05e429..36547e22c 100644 --- a/cmd/frostfs-adm/internal/modules/morph/policy/policy.go +++ b/cmd/frostfs-adm/internal/modules/morph/policy/policy.go @@ -30,7 +30,7 @@ var errInvalidParameterFormat = errors.New("invalid parameter format, must be Pa func SetPolicyCmd(cmd *cobra.Command, args []string) error { wCtx, err := helper.NewInitializeContext(cmd, viper.GetViper()) if err != nil { - return fmt.Errorf("can't to initialize context: %w", err) + return fmt.Errorf("can't initialize context: %w", err) } bw := io.NewBufBinWriter() diff --git a/cmd/frostfs-adm/internal/modules/morph/proxy/proxy.go b/cmd/frostfs-adm/internal/modules/morph/proxy/proxy.go index 7e173ac49..ba48465f7 100644 --- a/cmd/frostfs-adm/internal/modules/morph/proxy/proxy.go +++ b/cmd/frostfs-adm/internal/modules/morph/proxy/proxy.go @@ -39,7 +39,7 @@ func removeProxyAccount(cmd *cobra.Command, _ []string) { func processAccount(cmd *cobra.Command, addr util.Uint160, method string) error { wCtx, err := helper.NewInitializeContext(cmd, viper.GetViper()) if err != nil { - return fmt.Errorf("can't to initialize context: %w", err) + return fmt.Errorf("can't initialize context: %w", err) } r := management.NewReader(wCtx.ReadOnlyInvoker) diff --git a/cmd/frostfs-cli/modules/control/shards_list.go b/cmd/frostfs-cli/modules/control/shards_list.go index 3eb74ec82..07c5bcd9a 100644 --- a/cmd/frostfs-cli/modules/control/shards_list.go +++ b/cmd/frostfs-cli/modules/control/shards_list.go @@ -80,7 +80,7 @@ func prettyPrintShardsJSON(cmd *cobra.Command, ii []*control.ShardInfo) { enc.SetIndent("", " ") commonCmd.ExitOnErr(cmd, "cannot shard info to JSON: %w", enc.Encode(out)) - cmd.Print(buf.String()) // pretty printer emits newline, to no need for Println + cmd.Print(buf.String()) // pretty printer emits newline, so no need for Println } func prettyPrintShards(cmd *cobra.Command, ii []*control.ShardInfo) { diff --git a/cmd/frostfs-cli/modules/tree/add.go b/cmd/frostfs-cli/modules/tree/add.go index 8ceea4173..068b1d185 100644 --- a/cmd/frostfs-cli/modules/tree/add.go +++ b/cmd/frostfs-cli/modules/tree/add.go @@ -72,7 +72,7 @@ func add(cmd *cobra.Command, _ []string) { commonCmd.ExitOnErr(cmd, "signing message: %w", tree.SignMessage(req, pk)) resp, err := cli.Add(ctx, req) - commonCmd.ExitOnErr(cmd, "failed to cal add: %w", err) + commonCmd.ExitOnErr(cmd, "failed to call add: %w", err) cmd.Println("Node ID: ", resp.GetBody().GetNodeId()) } diff --git a/cmd/frostfs-node/config/cast.go b/cmd/frostfs-node/config/cast.go index c99d33569..beec09a9e 100644 --- a/cmd/frostfs-node/config/cast.go +++ b/cmd/frostfs-node/config/cast.go @@ -16,7 +16,7 @@ func panicOnErr(err error) { } // StringSlice reads a configuration value -// from c by name and casts it to a []string. +// from c by name and casts it to []string. // // Panics if the value can not be casted. func StringSlice(c *Config, name string) []string { @@ -27,7 +27,7 @@ func StringSlice(c *Config, name string) []string { } // StringSliceSafe reads a configuration value -// from c by name and casts it to a []string. +// from c by name and casts it to []string. // // Returns nil if the value can not be casted. func StringSliceSafe(c *Config, name string) []string { @@ -35,7 +35,7 @@ func StringSliceSafe(c *Config, name string) []string { } // String reads a configuration value -// from c by name and casts it to a string. +// from c by name and casts it to string. // // Panics if the value can not be casted. func String(c *Config, name string) string { @@ -46,7 +46,7 @@ func String(c *Config, name string) string { } // StringSafe reads a configuration value -// from c by name and casts it to a string. +// from c by name and casts it to string. // // Returns "" if the value can not be casted. func StringSafe(c *Config, name string) string { diff --git a/internal/logs/logs.go b/internal/logs/logs.go index 78f00c4ee..c5e4a8e28 100644 --- a/internal/logs/logs.go +++ b/internal/logs/logs.go @@ -402,9 +402,9 @@ const ( FrostFSNodeInternalApplicationError = "internal application error" FrostFSNodeInternalErrorProcessingIsComplete = "internal error processing is complete" FrostFSNodeSIGHUPHasBeenReceivedRereadingConfiguration = "SIGHUP has been received, rereading configuration..." - FrostFSNodeSIGHUPSkip = "node not ready for reconfiguration, skipped SIGHUP" - FrostFSNodeShutdownSkip = "node already is going to shutting down, skipped shutdown" - FrostFSNodeShutdownWhenNotReady = "node is going to shutting down when subsystems still initializing" + FrostFSNodeSIGHUPSkip = "node is not ready for reconfiguration, skipped SIGHUP" + FrostFSNodeShutdownSkip = "node is already shutting down, skipped shutdown" + FrostFSNodeShutdownWhenNotReady = "node is going to shut down when subsystems are still initializing" FrostFSNodeConfigurationReading = "configuration reading" FrostFSNodeLoggerConfigurationPreparation = "logger configuration preparation" FrostFSNodeTracingConfigationUpdated = "tracing configation updated" diff --git a/pkg/local_object_storage/blobstor/blobovniczatree/cache.go b/pkg/local_object_storage/blobstor/blobovniczatree/cache.go index 4fce3e81a..5c103c1bb 100644 --- a/pkg/local_object_storage/blobstor/blobovniczatree/cache.go +++ b/pkg/local_object_storage/blobstor/blobovniczatree/cache.go @@ -12,7 +12,7 @@ import ( // dbCache caches sharedDB instances that are NOT open for Put. // // Uses dbManager for opening/closing sharedDB instances. -// Stores a reference to an cached sharedDB, so dbManager does not close it. +// Stores a reference to a cached sharedDB, so dbManager does not close it. type dbCache struct { cacheGuard *sync.Mutex cache cache.Cache[string, *sharedDB] diff --git a/pkg/local_object_storage/metabase/graveyard.go b/pkg/local_object_storage/metabase/graveyard.go index df9a3d302..80d40fb78 100644 --- a/pkg/local_object_storage/metabase/graveyard.go +++ b/pkg/local_object_storage/metabase/graveyard.go @@ -128,7 +128,7 @@ func (g *GraveyardIterationPrm) SetHandler(h TombstonedHandler) { // Note: if offset is not found in db, iteration starts // from the element that WOULD BE the following after the // offset if offset was presented. That means that it is -// safe to delete offset element and pass if to the +// safe to delete offset element and pass it to the // iteration once again: iteration would start from the // next element. // diff --git a/pkg/local_object_storage/metabase/list.go b/pkg/local_object_storage/metabase/list.go index 544b2e666..b4326a92c 100644 --- a/pkg/local_object_storage/metabase/list.go +++ b/pkg/local_object_storage/metabase/list.go @@ -66,7 +66,7 @@ func (l ListRes) Cursor() *Cursor { // Use cursor value from response for consecutive requests. // // Returns ErrEndOfListing if there are no more objects to return or count -// parameter set to zero. +// parameter is set to zero. func (db *DB) ListWithCursor(ctx context.Context, prm ListPrm) (res ListRes, err error) { var ( startedAt = time.Now()