Fix grammar mistakes and misspelling #1217

Merged
fyrchik merged 1 commit from elebedeva/frostfs-node:fix/grammar-and-misspelling into master 2024-07-02 11:30:35 +00:00
12 changed files with 17 additions and 17 deletions

View file

@ -9,7 +9,7 @@ jobs:
SKIP: make-lint,go-staticcheck-repo-mod,go-unit-tests,gofumpt SKIP: make-lint,go-staticcheck-repo-mod,go-unit-tests,gofumpt
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
# If we use actions/setup-python from either Github or Gitea, # 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. # So install everything manually.
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View file

@ -426,7 +426,7 @@ type frostfsidClient struct {
func newFrostfsIDClient(cmd *cobra.Command) (*frostfsidClient, error) { func newFrostfsIDClient(cmd *cobra.Command) (*frostfsidClient, error) {
wCtx, err := helper.NewInitializeContext(cmd, viper.GetViper()) wCtx, err := helper.NewInitializeContext(cmd, viper.GetViper())
if err != nil { 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) r := management.NewReader(wCtx.ReadOnlyInvoker)

View file

@ -15,7 +15,7 @@ import (
func ForceNewEpochCmd(cmd *cobra.Command, _ []string) error { func ForceNewEpochCmd(cmd *cobra.Command, _ []string) error {
wCtx, err := helper.NewInitializeContext(cmd, viper.GetViper()) wCtx, err := helper.NewInitializeContext(cmd, viper.GetViper())
if err != nil { 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) r := management.NewReader(wCtx.ReadOnlyInvoker)

View file

@ -30,7 +30,7 @@ var errInvalidParameterFormat = errors.New("invalid parameter format, must be Pa
func SetPolicyCmd(cmd *cobra.Command, args []string) error { func SetPolicyCmd(cmd *cobra.Command, args []string) error {
wCtx, err := helper.NewInitializeContext(cmd, viper.GetViper()) wCtx, err := helper.NewInitializeContext(cmd, viper.GetViper())
if err != nil { 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() bw := io.NewBufBinWriter()

View file

@ -39,7 +39,7 @@ func removeProxyAccount(cmd *cobra.Command, _ []string) {
func processAccount(cmd *cobra.Command, addr util.Uint160, method string) error { func processAccount(cmd *cobra.Command, addr util.Uint160, method string) error {
wCtx, err := helper.NewInitializeContext(cmd, viper.GetViper()) wCtx, err := helper.NewInitializeContext(cmd, viper.GetViper())
if err != nil { 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) r := management.NewReader(wCtx.ReadOnlyInvoker)

View file

@ -80,7 +80,7 @@ func prettyPrintShardsJSON(cmd *cobra.Command, ii []*control.ShardInfo) {
enc.SetIndent("", " ") enc.SetIndent("", " ")
commonCmd.ExitOnErr(cmd, "cannot shard info to JSON: %w", enc.Encode(out)) 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) { func prettyPrintShards(cmd *cobra.Command, ii []*control.ShardInfo) {

View file

@ -72,7 +72,7 @@ func add(cmd *cobra.Command, _ []string) {
commonCmd.ExitOnErr(cmd, "signing message: %w", tree.SignMessage(req, pk)) commonCmd.ExitOnErr(cmd, "signing message: %w", tree.SignMessage(req, pk))
resp, err := cli.Add(ctx, req) 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()) cmd.Println("Node ID: ", resp.GetBody().GetNodeId())
} }

View file

@ -16,7 +16,7 @@ func panicOnErr(err error) {
} }
// StringSlice reads a configuration value // 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. // Panics if the value can not be casted.
func StringSlice(c *Config, name string) []string { func StringSlice(c *Config, name string) []string {
@ -27,7 +27,7 @@ func StringSlice(c *Config, name string) []string {
} }
// StringSliceSafe reads a configuration value // 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. // Returns nil if the value can not be casted.
func StringSliceSafe(c *Config, name string) []string { func StringSliceSafe(c *Config, name string) []string {
@ -35,7 +35,7 @@ func StringSliceSafe(c *Config, name string) []string {
} }
// String reads a configuration value // 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. // Panics if the value can not be casted.
func String(c *Config, name string) string { func String(c *Config, name string) string {
@ -46,7 +46,7 @@ func String(c *Config, name string) string {
} }
// StringSafe reads a configuration value // 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. // Returns "" if the value can not be casted.
func StringSafe(c *Config, name string) string { func StringSafe(c *Config, name string) string {

View file

@ -402,9 +402,9 @@ const (
FrostFSNodeInternalApplicationError = "internal application error" FrostFSNodeInternalApplicationError = "internal application error"
FrostFSNodeInternalErrorProcessingIsComplete = "internal error processing is complete" FrostFSNodeInternalErrorProcessingIsComplete = "internal error processing is complete"
FrostFSNodeSIGHUPHasBeenReceivedRereadingConfiguration = "SIGHUP has been received, rereading configuration..." FrostFSNodeSIGHUPHasBeenReceivedRereadingConfiguration = "SIGHUP has been received, rereading configuration..."
FrostFSNodeSIGHUPSkip = "node not ready for reconfiguration, skipped SIGHUP" FrostFSNodeSIGHUPSkip = "node is not ready for reconfiguration, skipped SIGHUP"
FrostFSNodeShutdownSkip = "node already is going to shutting down, skipped shutdown" FrostFSNodeShutdownSkip = "node is already shutting down, skipped shutdown"
FrostFSNodeShutdownWhenNotReady = "node is going to shutting down when subsystems still initializing" FrostFSNodeShutdownWhenNotReady = "node is going to shut down when subsystems are still initializing"
FrostFSNodeConfigurationReading = "configuration reading" FrostFSNodeConfigurationReading = "configuration reading"
FrostFSNodeLoggerConfigurationPreparation = "logger configuration preparation" FrostFSNodeLoggerConfigurationPreparation = "logger configuration preparation"
FrostFSNodeTracingConfigationUpdated = "tracing configation updated" FrostFSNodeTracingConfigationUpdated = "tracing configation updated"

View file

@ -12,7 +12,7 @@ import (
// dbCache caches sharedDB instances that are NOT open for Put. // dbCache caches sharedDB instances that are NOT open for Put.
// //
// Uses dbManager for opening/closing sharedDB instances. // 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 { type dbCache struct {
cacheGuard *sync.Mutex cacheGuard *sync.Mutex
cache cache.Cache[string, *sharedDB] cache cache.Cache[string, *sharedDB]

View file

@ -128,7 +128,7 @@ func (g *GraveyardIterationPrm) SetHandler(h TombstonedHandler) {
// Note: if offset is not found in db, iteration starts // Note: if offset is not found in db, iteration starts
// from the element that WOULD BE the following after the // from the element that WOULD BE the following after the
// offset if offset was presented. That means that it is // 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 // iteration once again: iteration would start from the
// next element. // next element.
// //

View file

@ -66,7 +66,7 @@ func (l ListRes) Cursor() *Cursor {
// Use cursor value from response for consecutive requests. // Use cursor value from response for consecutive requests.
// //
// Returns ErrEndOfListing if there are no more objects to return or count // 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) { func (db *DB) ListWithCursor(ctx context.Context, prm ListPrm) (res ListRes, err error) {
var ( var (
startedAt = time.Now() startedAt = time.Now()