Skip to content

Commit

Permalink
cli/control: Do not lose errors
Browse files Browse the repository at this point in the history
Regression from 9ac84e3. Detected by
the linter:
```
cmd/neofs-cli/modules/control/shards_dump.go:65:2    ineffassign  ineffectual assignment to err
cmd/neofs-cli/modules/control/synchronize_tree.go:41:6 ineffassign  ineffectual assignment to err
```

Signed-off-by: Leonard Lyubich <[email protected]>
  • Loading branch information
cthulhu-rider committed Dec 18, 2024
1 parent c161779 commit 2520d09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/neofs-cli/modules/control/shards_dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ func dumpShard(cmd *cobra.Command, _ []string) error {
return fmt.Errorf("rpc error: %w", err)
}

err = verifyResponse(resp.GetSignature(), resp.GetBody())
if err = verifyResponse(resp.GetSignature(), resp.GetBody()); err != nil {
return err
}

Check warning on line 67 in cmd/neofs-cli/modules/control/shards_dump.go

View check run for this annotation

Codecov / codecov/patch

cmd/neofs-cli/modules/control/shards_dump.go#L65-L67

Added lines #L65 - L67 were not covered by tests

cmd.Println("Shard has been dumped successfully.")
return nil
Expand Down
3 changes: 3 additions & 0 deletions cmd/neofs-cli/modules/control/synchronize_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ func synchronizeTree(cmd *cobra.Command, _ []string) error {
defer cancel()

pk, err := key.Get(cmd)
if err != nil {
return err
}

Check warning on line 44 in cmd/neofs-cli/modules/control/synchronize_tree.go

View check run for this annotation

Codecov / codecov/patch

cmd/neofs-cli/modules/control/synchronize_tree.go#L42-L44

Added lines #L42 - L44 were not covered by tests

var cnr cid.ID
cidStr, _ := cmd.Flags().GetString(commonflags.CIDFlag)
Expand Down

0 comments on commit 2520d09

Please sign in to comment.