Skip to content

Commit

Permalink
refactor: refactoring checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ameeetgaikwad committed Jan 7, 2025
1 parent e233fd2 commit 234c903
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cli/filplus.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ var filplusRemoveExpiredAllocationsCmd = &cli.Command{
},
},
Action: func(cctx *cli.Context) error {
if cctx.NArg() < 1 {
if cctx.NArg() != 1 {
return IncorrectNumArgs(cctx)
}

Expand Down Expand Up @@ -638,7 +638,7 @@ var filplusRemoveExpiredClaimsCmd = &cli.Command{
},
},
Action: func(cctx *cli.Context) error {
if cctx.NArg() < 1 {
if cctx.NArg() != 1 {
return IncorrectNumArgs(cctx)
}

Expand Down
2 changes: 1 addition & 1 deletion cli/spcli/sectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ func TerminateSectorCmd(getActorAddress ActorAddressGetter) *cli.Command {
},
},
Action: func(cctx *cli.Context) error {
if cctx.NArg() < 1 {
if cctx.NArg() != 1 {
return lcli.ShowHelp(cctx, fmt.Errorf("at least one sector must be specified"))
}

Expand Down
2 changes: 1 addition & 1 deletion cli/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ var walletMarketAdd = &cli.Command{
afmt := NewAppFmt(cctx.App)

// Get amount param
if cctx.NArg() < 1 {
if cctx.NArg() != 1 {
return IncorrectNumArgs(cctx)
}
f, err := types.ParseFIL(cctx.Args().First())
Expand Down
2 changes: 1 addition & 1 deletion cmd/lotus-miner/proving.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ var provingRecoverFaultsCmd = &cli.Command{
},
},
Action: func(cctx *cli.Context) error {
if cctx.NArg() < 1 {
if cctx.NArg() != 1 {
return lcli.ShowHelp(cctx, xerrors.Errorf("must pass at least 1 sector number"))
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/lotus-miner/sealing.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ var sealingDataCidCmd = &cli.Command{
},
},
Action: func(cctx *cli.Context) error {
if cctx.NArg() < 1 || cctx.NArg() > 2 {
if cctx.NArg() != 1 || cctx.NArg() > 2 {
return lcli.ShowHelp(cctx, xerrors.Errorf("expected 1 or 2 arguments"))
}

Expand Down

0 comments on commit 234c903

Please sign in to comment.