From 56eeb630b6fbe67a26e043e6de8d523839327723 Mon Sep 17 00:00:00 2001 From: Ekaterina Lebedeva Date: Mon, 1 Jul 2024 18:58:37 +0300 Subject: [PATCH] [#1217] Fix grammar mistakes and misspelling Signed-off-by: Ekaterina Lebedeva --- .forgejo/workflows/pre-commit.yml | 2 +- .../internal/modules/morph/frostfsid/frostfsid.go | 2 +- cmd/frostfs-adm/internal/modules/morph/netmap/epoch.go | 2 +- cmd/frostfs-adm/internal/modules/morph/policy/policy.go | 2 +- cmd/frostfs-adm/internal/modules/morph/proxy/proxy.go | 2 +- cmd/frostfs-cli/modules/control/shards_list.go | 2 +- cmd/frostfs-cli/modules/tree/add.go | 2 +- cmd/frostfs-node/config/cast.go | 8 ++++---- internal/logs/logs.go | 6 +++--- .../blobstor/blobovniczatree/cache.go | 2 +- pkg/local_object_storage/metabase/graveyard.go | 2 +- pkg/local_object_storage/metabase/list.go | 2 +- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.forgejo/workflows/pre-commit.yml b/.forgejo/workflows/pre-commit.yml index 6453b502..117cda93 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 54128296..6b274ddf 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 4fd671f2..e60dc567 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 5ab05e42..36547e22 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 7e173ac4..ba48465f 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 3eb74ec8..07c5bcd9 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 8ceea417..068b1d18 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 c99d3356..beec09a9 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 78f00c4e..c5e4a8e2 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 4fce3e81..5c103c1b 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 df9a3d30..80d40fb7 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 544b2e66..b4326a92 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()