Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No ArgsUsage field for clientGetDealCmd #8133

Closed
Elestrias opened this issue Feb 17, 2022 · 0 comments · Fixed by #8241
Closed

No ArgsUsage field for clientGetDealCmd #8133

Elestrias opened this issue Feb 17, 2022 · 0 comments · Fixed by #8241
Labels
area/cli effort/minutes good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Elestrias
Copy link

Elestrias commented Feb 17, 2022

lotus/cli/client.go

Lines 1905 to 1950 in 72021b3

var clientGetDealCmd = &cli.Command{
Name: "get-deal",
Usage: "Print detailed deal information",
Action: func(cctx *cli.Context) error {
if !cctx.Args().Present() {
return cli.ShowCommandHelp(cctx, cctx.Command.Name)
}
api, closer, err := GetFullNodeAPI(cctx)
if err != nil {
return err
}
defer closer()
ctx := ReqContext(cctx)
propcid, err := cid.Decode(cctx.Args().First())
if err != nil {
return err
}
di, err := api.ClientGetDealInfo(ctx, propcid)
if err != nil {
return err
}
out := map[string]interface{}{
"DealInfo: ": di,
}
if di.DealID != 0 {
onChain, err := api.StateMarketStorageDeal(ctx, di.DealID, types.EmptyTSK)
if err != nil {
return err
}
out["OnChain"] = onChain
}
b, err := json.MarshalIndent(out, "", " ")
if err != nil {
return err
}
fmt.Println(string(b))
return nil
},
}

Greetings everyone, it seems to be a minor style inconsistency in your cli function declaration. The point is that your function uses positional argument usually called proposal-cid, however that argument wasn't described in ArgUsage field.

@Elestrias Elestrias changed the title No ArgUsage field for clientCmd No ArgыUsage field for clientGetDealCmd Feb 17, 2022
@Elestrias Elestrias changed the title No ArgыUsage field for clientGetDealCmd No ArgsUsage field for clientGetDealCmd Feb 17, 2022
@magik6k magik6k added area/cli effort/minutes good first issue Good for newcomers help wanted Extra attention is needed labels Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli effort/minutes good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants