Skip to content

Commit

Permalink
fix: fix the position of the format flag
Browse files Browse the repository at this point in the history
  • Loading branch information
flywukong committed Nov 22, 2023
1 parent ca14e2c commit 04ac22d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
22 changes: 22 additions & 0 deletions cmd/cmd_head.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ func cmdHeadObj() *cli.Command {
send headObject txn to chain and fetch object info on greenfield chain
Examples:
$ gnfd-cmd object head gnfd://bucket-name/object-name`,
Flags: []cli.Flag{
&cli.StringFlag{
Name: formatFlag,
Aliases: []string{"f"},
Value: defaultFormat,
Usage: "return the meta with the format of plaintxt or json",
},
},
}
}

Expand All @@ -33,6 +41,14 @@ func cmdHeadBucket() *cli.Command {
send headBucket txn to chain and fetch bucket info on greenfield chain
Examples:
$ gnfd-cmd bucket head gnfd://bucket-name`,
Flags: []cli.Flag{
&cli.StringFlag{
Name: formatFlag,
Aliases: []string{"f"},
Value: defaultFormat,
Usage: "return the meta with the format of plaintxt or json",
},
},
}
}

Expand All @@ -53,6 +69,12 @@ $ gnfd-cmd group head --groupOwner group-name`,
Value: "",
Usage: "need set the owner address if you are not the owner of the group",
},
&cli.StringFlag{
Name: formatFlag,
Aliases: []string{"f"},
Value: defaultFormat,
Usage: "return the meta with the format of plaintxt or json",
},
},
}
}
Expand Down
6 changes: 0 additions & 6 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ func main() {
Aliases: []string{"p"},
Usage: "password file for encrypting and decoding the private key",
},
&cli.StringFlag{
Name: formatFlag,
Aliases: []string{"f"},
Value: defaultFormat,
Usage: "return format of plaintxt or json",
},
&cli.StringFlag{
Name: configFlag,
Aliases: []string{"c"},
Expand Down

0 comments on commit 04ac22d

Please sign in to comment.